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
Returns the number of elements in the sorted set
dataset/ETHPy150Open tschellenbach/Stream-Framework/stream_framework/storage/redis/structures/hash.py/ShardedHashCache.count