Domanda di colloquio di Atlassian

Write a function that implements a vote counting algorithm.