Fix logging the number of players.

Using the "#" operator is unreliable in this case, which is why we have
the get_num_players() function.