'Returns the number of elements in the sorted set'

def count(self):

    logger.warn('counting    all    keys    is    slow    and    should    be    used    sparsely')
    keys = self.get_keys()
    total = 0
    for key in keys:
        redis_result = self.redis.hlen(key)
        redis_count = int(redis_result)
        total += redis_count
    return total
