CLUSTER COUNTKEYSINSLOT

Usage:
CLUSTER COUNTKEYSINSLOT slot
Complexity:
O(1)
Since:
3.0.0

Returns the number of keys in the specified Valkey Cluster hash slot. The command only queries the local data set, so contacting a node that is not serving the specified hash slot will always result in a count of zero being returned.

> CLUSTER COUNTKEYSINSLOT 7000
(integer) 50341