SCARD
Synopsis
SCARD key
This command finds the cardinality of the set that is associated with the given key
. Cardinality is the number of elements in a set.
Return value
Returns the cardinality of the set.
Examples
You can do this as shown below.
$ SADD yuga_world "America"
1
$ SADD yuga_world "Asia"
1
$ SCARD yuga_world
2