def basic_stats(db):
    """Collect basic statistics to be fed to output functions"""
    rps = len(list(db['rp'].keys()))
    users = len(list(db['users'].keys()))
    logins = db['logins']
    return {"rps": rps, "users": users, "logins": logins}