Fixed recursion in getPlayerCount