Returns the reference count of a value of a key.
OBJECT
REFCOUNT key
This command returns the reference count of the stored at
<key>.
One of the following:
Integer: the number of references.
Null: if key doesn’t exist.
O(1)
@keyspace @read @slow
COPY, DEL, DUMP, EXISTS, EXPIRE, EXPIREAT, EXPIRETIME, KEYS, MIGRATE, MOVE, OBJECT, OBJECT ENCODING, OBJECT FREQ, OBJECT HELP, OBJECT IDLETIME, PERSIST, PEXPIRE, PEXPIREAT, PEXPIRETIME, PTTL, RANDOMKEY, RENAME, RENAMENX, RESTORE, SCAN, SORT, SORT_RO, TOUCH, TTL, TYPE, UNLINK, WAIT, WAITAOF.