'Get the number of connected players (not sessions since a
player may have more than one session depending on settings).
Only logged-in players are counted here.
Returns:
nplayer (int): Number of connected players'

def player_count(self):

    return len(set((session.uid for session in self.values() if session.logged_in)))
