Figuring out who won any election once voting has concluded essentially boils down to two fundamental questions: how many votes have been cast for each candidate so far and how many ballots still need to be counted?