If you get an error that reads “WRONGTYPE Operation against a key holding the wrong kind of value” when using the ZCOUNT
command in Redis, it’s probably because you’re passing a key with the wrong data type.
To fix this issue, be sure that the key you pass to the ZCOUNT
command holds a sorted set.