If you live outside of the US but are a registered US voter which state does your vote count in?
The state you last lived in, but only for offices that are voted on statewide.
My mother lives in England, and her last U.S. address was in New York. She votes for president, vice president, senator, and the state governor and comptroller. She doesn't get to vote for Congress, state legislature, or anything else that is divided up by districts or counties.
Disclaimer: I don't know, if the person last lived in a state with only one member of Congress, whether their vote would count for that.
This year, New Yorkers displaced by Sandy can vote at any polling place in the state, with a similar restriction: the vote counts for president and senate, and for anything else, it only counts if the person lives in the district they are handed a ballot for. (Someone's vote might thus count for congress but not the state legislature, or vice versa, or for neither.) It's not perfect, but probably the best they can manage under the circumstances.