ZcardCommand: Contents
  ZCARD _key_ (Redis >
    Return value
    See also

ZcardCommand

ZCARD _key_ (Redis >

1.1) = Time complexity O(1)
Return the sorted set cardinality (number of elements). If the key does notexist 0 is returned, like for empty sorted sets.

Return value

Integer reply, specifically:

the cardinality (number of elements) of the set as an integer.

See also