CF.COUNT key item
Available in:
Redis Stack / Bloom 1.0.0
Time complexity:
O(k), where k is the number of sub-filters

Returns the number of times an item may be in the filter. Because this is a probabilistic data structure, this may not necessarily be accurate.

If you just want to know if an item exists in the filter, use CF.EXISTS because it is more efficient for that purpose.


  • key: The name of the filter
  • item: The item to count


Integer reply - with the count of possible matching copies of the item in the filter.


redis> CF.COUNT cf item1
(integer) 42
redis> CF.COUNT cf item_new
(integer) 0


If you've found issues on this page, or have suggestions for improvement, please submit a request to merge or open an issue in the repository.