SDIFFCARD
Since 1.1.0Sets
Syntax
SDIFFCARD numkeys key [key ...] [LIMIT limit]Returns how many members the difference of the given sets has, without returning them: a command of Redis 8.10. numkeys is how many keys follow. LIMIT limit stops counting at limit.
Reply
- The count.
Examples
> SADD x a b c d
(integer) 4
> SADD y c d e
(integer) 3
> SDIFFCARD 2 x y
(integer) 2