Ruby hash-methods reference.
Returns the number of key-value pairs in a hash, or the count of entries matching a condition.