PFCOUNT

Since 1.1.0HyperLogLog

Syntax

PFCOUNT key [key ...]
  • Flags: readonly
  • ACL categories: @hyperloglog, @read, @slow
  • Arity: -2

Returns the estimated number of different elements added to the HyperLogLog at key. With several keys, the estimate for their union, without storing it.

Reply

  • The estimate; 0 if the key does not exist.

Examples

> PFADD h a b c d
(integer) 1
> PFADD h2 c d e f
(integer) 1
> PFCOUNT h h2
(integer) 6