summaryrefslogtreecommitdiffstats
path: root/iredis/data/commands/zcard.md
blob: 5ad504335d71174ce25487136213bcb6cbf5af8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Returns the sorted set cardinality (number of elements) of the sorted set stored
at `key`.

@return

@integer-reply: the cardinality (number of elements) of the sorted set, or `0`
if `key` does not exist.

@examples

```cli
ZADD myzset 1 "one"
ZADD myzset 2 "two"
ZCARD myzset
```