A very interesting question, since many politicians want to say they want every ballot counted. (I'd guess if they knew they would lose votes, they'd prefer them not being counted where possible. lol).
I heard a rumor that in California, all ballots are not counted, unless it is a close race. Since I tend to vote via absentee ballot and in Ca. I was very curious about this issue as well.
From my quick research, it seems to me each state may have different rules; at least based on this comment:
*All valid absentee ballots are counted in every election in California, regardless of the outcome or closeness of any race.
Oddly, I ran across an article where Brouard County in Fl. had made headlines in 2004, for yet another cry of "Foul" with ballots. This time, I have to side with residents and even the ACLU, where ballots were mailed late, and received the day of the election. A lawsuit was filed.
Pennsylvania Govenor Rendell insisted all eligible ballots will be counted; including absentee ballots. This was in 2004.
I cannot verify, however, whether all states do in fact count all eligible absentee ballots if the ballots will not affect the outcome. Spoiled ballots (voting for 2 candidates, and many other rules) can disqualify ballots, and absentee ballots.
I find it hard to believe, however, that this would be true. It seems unlikely any eligible ballot would go uncounted, because there are usually more issues than major races. There are propositions, judges, and other smaller issues that would undoubtedly get questioned if all ballots were not counted.