{
  "id": "cf.count",
  "title": "CF.COUNT",
  "url": "https://redis.io/docs/latest/commands/cf.count/",
  "summary": "Return the number of times an item might be in a Cuckoo Filter",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-04-09T10:29:34-04:00",
  "page_type": "content",
  "content_hash": "0948a019e140826e250acc225cfcd0df3ebb07e21c729d04588119a7b0e9b8e1",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns an estimation of the number of times a given item was added to a cuckoo filter.\n\nIf you just want to check that a given item was added to a cuckoo filter, use [`CF.EXISTS`]()."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nis key name for a cuckoo filter.\n\n</details>\n\n<details open><summary><code>item</code></summary>\n\nis an item to check.\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "redis> CF.INSERT cf ITEMS item1 item2 item2\n1) (integer) 1\n2) (integer) 1\n3) (integer) 1\nredis> CF.COUNT cf item1\n(integer) 1\nredis> CF.COUNT cf item2\n(integer) 2"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Supported</span><br /> | <span title=\"Supported\">&#x2705; Flexible & Annual</span><br /><span title=\"Supported\">&#x2705; Free & Fixed</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\nOne of the following:\n* [Integer reply](), where a positive value is an estimation of the number of times `item` was added to the filter. An overestimation is possible, but not an underestimation. `0` means that `key` does not exist or that `item` had not been added to the filter. See the note in [`CF.DEL`]().\n* [Simple error]() in these cases: invalid arguments or wrong key type.\n\n**RESP3:**\n\nOne of the following:\n* [Integer reply](), where a positive value is an estimation of the number of times `item` was added to the filter. An overestimation is possible, but not an underestimation. `0` means that `key` does not exist or that `item` had not been added to the filter. See the note in [`CF.DEL`]().\n* [Simple error]() in these cases: invalid arguments or wrong key type."
    }
  ],
  "examples": []
}
