title: How to get Redis Hash Length?
body: <p>I store objects using hashes on Redis and I would like to calculate the length of these Hashes from Redis point of view.</p>
  
  <p>You can do this easily for strings using <code>STRLEN</code>.</p>
  
  <p>But I simply can not find a suitable command for the hash data type in the <a href="http://redis.io/commands" rel="noreferrer">documentation</a>. It seems to be the same thing for lists or sets.</p>
  
  <p>Basically, the only solution that I found is to get the whole hash with <code>HGETALL</code>  and to calculate the length on client size.</p>
  
  <p>Is is something completely out of the box ?</p>
  
  <p>If I'm wrong, please do not hesite to explain  me why or give me relevant links/posts/SO questions.</p>
  
  <p><strong>Edit</strong> : </p>
  
  <p><a href="http://redis.io/commands/hlen" rel="noreferrer">HLEN</a> is not a solution because it "Returns the number of fields contained in the hash".
  I want to calculate this size for Capacity Planning &amp; Active Monitoring on Redis database.</p>