{
  "id": "count",
  "title": "Count",
  "url": "https://redis.io/docs/latest/operate/oss_and_stack/stack-with-enterprise/deprecated-features/gears-v1/jvm/classes/gearsbuilder/count/",
  "summary": "Counts the number of records in the pipe.",
  "tags": [
    "docs",
    "operate",
    "stack"
  ],
  "last_updated": "2026-04-22T11:55:45+02:00",
  "page_type": "content",
  "content_hash": "2d5687fe17e1d361766366ecfad13edaffd4b2fc5836e50fec01227109f76f74",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "[code example]\n\nCounts the number of records in the pipe and returns the total as a single record."
    },
    {
      "id": "parameters",
      "title": "Parameters",
      "role": "parameters",
      "text": "None"
    },
    {
      "id": "returns",
      "title": "Returns",
      "role": "returns",
      "text": "Returns a GearsBuilder object with a new template type of `Integer`."
    },
    {
      "id": "example",
      "title": "Example",
      "role": "example",
      "text": "[code example]"
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "java",
      "code": "public GearsBuilder<java.lang.Integer> count()",
      "section_id": "overview"
    },
    {
      "id": "example-ex0",
      "language": "java",
      "code": "GearsBuilder.CreateGearsBuilder(reader).count();",
      "section_id": "example"
    }
  ]
}
