Why O(log n)? Is there a binary search involved somewhere (for example)? All you have got to do to find out how many people voted for it is to look at the vote count and this seems like an O(1) operation doesn't it?
The number n has log(n)/log(10) digits so it technically take log(n) time to read it.
only if log(n) > 7. Otherwise, subitization gives constant time reading of the magnitude of n.
Technically, O(log(n) <= 7 ? 1 : log(n)) is still O(log(n)) ... :)