Huge refactoring in countVotes
Functions extracted from countVotes
Summary working for a lot of votes, but no duplications allowed