We need to propose a constitutional amendment that reads:
"As long as a voter's intent can be determined, and the voter has the legal right to vote in the race in question, said voter's vote shall be counted, notwithstanding any other legal or procedural issues."
It could work as a Federal Law, although a constitutional amendment is better, mainly so it would be sure to apply to all races, federal, state, and local, although you could tie it to funding to force it to apply to all races.
It would prevent things like this, http://www.signonsandiego.com/uniontrib/20041209/news_1n9murphy.html http://www.latimes.com/news/local/la-me-sdmayor20nov20,1,6090325.story?coll=la-headlines-california , where it appears a write in canidate got more votes than the declared winner for mayor of San Deigo, but another canidate (the incumbent) was sworn in as the winner, because an unknown number of voters didn't fill in the bubble where they wrote in the write-in canidate's name.
It also would help with some Ohio problems, such as when people voted in the wrong precinct.
It's simple, easy to understand, and impossible to be against, because then you could just say "They don't want to count all the votes".
Of course, this doesn't fix all problems (such as fraud of any kind), but it does tidy up the eighty nine bazillion lawsuits that are attempting to throw out ballots.