In the presidential election, the electoral college is supposed to vote on a date in mid-December, if I recall correctly. Which means that each state should have certified the election returns before that date.
I see your point about long drawn out vote counts, but I suspect if that were to happen in the presidential election in enough states, it would be done to deny Trump the victory in the electoral vote.
The SCOTUS resolved that issue in Gore v Bush when owl Gore tried to steal an election.