Trying to count the number of bank screwups during the foreclosure crisis is a little like guessing the amount of change in a huge jar: You can see that the answer is "an awful lot," but without breaking the jar and counting by hand, there's no way to know for sure.

On Thursday, however, just how much homeowner misery Ally Financial may be responsible for came to light after the Federal Reserve released a letter that details exactly how many borrowers' cases may have been mishandled.

Ally, formerly an arm of General Motors, needed a $17.2 billion bailout to survive the mortgage crash. It repaid about $5.5 billion, meaning taxpayers own 74 percent of the bank. Earlier this month, the bank sought Chapter 11 bankruptcy protection for ResCap, its residential mortgage unit.

The letter dated Feb. 1 is from the bank's mortgage servicing unit, GMAC Mortgage, to PricewaterhouseCoopers, the accounting firm it hired to review troubled loans as part of a 2011 agreement with federal regulators. It puts a number on some of the mortgages the bank may have handled incorrectly. Some highlights:

  • GMAC started foreclosure proceedings on 1,270 borrowers who were in some stage of the bankruptcy process, and thus should have been protected from foreclosure.
  • GMAC carried out foreclosure sales on 1,577 borrowers who were awaiting a decision about a loan modification. This is known as "dual tracking" and is one of the biggest complaints of homeowners and their advocates.
  • The mortgage servicer hired a law firm that was subsequently "delisted" to process 30,235 foreclosures. The names of the firms are redacted, but presumably include several of those accused of forging documents as part of the robo-signing scandal.
  • The mortgage servicer denied 50,030 borrowers for a government-run Home Affordable Modification Program, and then offered no alternative modification.

Referring a loan for review because it meets certain specifications doesn't necessarily mean that the bank acted unlawfully.

GMAC says in the letter that the number of borrowers subject to the review -- those whose homes were in some stage of foreclosure in 2009 or 2010 -- is 232,132. That's a small share of the estimated 4.5 million borrowers whose loans were handled by one of the 14 mortgage servicers who signed consent agreements with the federal Office of the Comptroller of the Currency and other regulators in early 2011.

Those agreements with federal regulators require the servicers to reform how they manage troubled loans and also set up the Independent Foreclosure Review. The latter is a program that allows borrowers who think their servicer made a mistake during the foreclosure process to submit a claim for review. As The Huffington Post previously reported, most eligible borrowers so far haven't applied, though they have until the end of July.

The deals also required the servicers to hire an outside accountant to review loans with a greater likelihood of having been mishandled. The newly released document is the "engagement letter" between GMAC and PricewaterhouseCoopers, which is acting as an "independent consultant," not an auditor.

The court agreements require an review of every loan in some instances, including situations where a home was foreclosed on while the borrower was protected by bankruptcy law. In other cases, the bank is required to have just a small sample evaluated for possible errors or misconduct.

GMAC spokeswoman Susan Fitzpatrick said in an email that the loan servicer "has worked closely with regulators and independent consultants to ensure consistency, and fair and impartial reviews."

It's not clear when the reviews by GMAC and the 13 other servicers will wrap up, or whether they will finally answer some basic questions about the extent of the foreclosure crisis. One of the great mysteries of the five-year ordeal is that no one really knows how often banks or other mortgage servicers screwed up a loan modification, made a costly accounting mistake, or illegally foreclosed on a homeowner. Anecdotal evidence from thousands of homeowners, and information from a few limited audits, suggest widespread misconduct, but the financial institutions that service mortgages have fought a true accounting.

Ally is also one of five banks that recently agreed to a $25 billion mortgage fraud settlement with the federal government and the attorney's general of 49 states.

UPDATE: This article has been updated to include a response from GMAC Mortgage. Portions of a letter sent to The Huffington Post from the servicer in response to our story are included below.

It’s important to note that the populations outlined in the engagement letter released by the Federal Reserve are those to be tested, not populations that have been identified as having any errors. Referring a loan for review does not mean there were errors or any unlawful activity.
  • GMAC immediately stops a foreclosure action when notified by the court that a borrower has filed for bankruptcy. "In most cases" the notification comes within 24 hours.
  • GMAC "continues to reach out to borrowers throughout the lengthy foreclosure process, looking for a sustainable solution to avoid a foreclosure sale, including a loan modification." The loan servicer is working with Fannie Mae and Freddie Mac, with regulators, and with state attorneys general to make the dual-tracking process "clear and more consistent."
  • GMAC Mortgage does not refer foreclosure cases to law firms that have been removed from those lists. In some circumstances, entire case loads were pulled from law firms that we found were not performing up to our standards, even before those firms were removed from the GSE approved lists.
  • There are many reasons why a loan modification might be denied, ranging from an incomplete financial package to non-qualifying debt-to-income ratio. To be clear, the numbers referenced above do not reflect loans which have been found to be erroneously handled, but instead they reflect the entire population of each segment required to be tested by the regulators. GMAC Mortgage has been recognized as a leader in loan modifications. Since 2008, the company has completed more than 784,000 default workouts for borrowers, which represent more than 29 percent of loans serviced during that period.

CORRECTION: A previous version of this story identified PriceWaterhouseCoopers as the auditor reviewing home loans, when in fact the firm's role is not officially as auditor but as an "independent consultant."