'Count the number of user servers that are active/pending/ready
Returns dict with counts of active/pending/ready servers'

def count_active_users(self):

    counts = defaultdict((lambda : 0))
    for user in self.values():
        for spawner in user.spawners.values():
            pending = spawner.pending
            if pending:
                counts['pending'] += 1
                counts[(pending + '_pending')] += 1
            if spawner.active:
                counts['active'] += 1
            if spawner.ready:
                counts['ready'] += 1
    return counts
