How can I find the count of all the keys that has a matching pattern.
For example, there are two keys abc:random-text-1 and abc:random-text-2 .
abc:random-text-1
abc:random-text-2
From here:
eval "return #redis.pcall('keys', 'abc:*')" 0
It's not O(1), but at least the count is done on the server side.