Fix votes count calculation