{
  "id": "arcount",
  "title": "ARCOUNT",
  "url": "https://redis.io/docs/latest/commands/arcount/",
  "summary": "Returns the number of non-empty elements in an array.",
  "tags": [
    "docs",
    "develop",
    "oss",
    "rs",
    "rc",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-05-25T10:30:01-07:00",
  "page_type": "content",
  "content_hash": "0a7bc91a43fd4a92d26b47b3b73c9710d22632517028348157cb315ac437ad2c",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Returns the number of non-empty elements in an array."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary>\n\nThe name of the key that holds the array.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "ARSET myarray 0 \"a\"\nARSET myarray 5 \"b\"\nARCOUNT myarray"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): The number of non-empty elements, or 0 if key does not exist.\n\n**RESP3:**\n\n[Integer reply](../../develop/reference/protocol-spec#integers): The number of non-empty elements, or 0 if key does not exist."
    }
  ],
  "examples": []
}
