Pregunta de entrevista de Atlassian

Write a function that implements a vote counting algorithm.