Skip to content

ZCARD

ZCARD key

ZCARD returns the cardinality of the sorted set stored at key.

The command returns 0 if key does not exist.

locahost:7379> ZADD users 1 alice 2 bob 3 charlie
OK 3
locahost:7379> ZCARD users
OK 3
localhost:7379> ZCARD nonexistent_key
OK 0