> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/data/store-element-count.md). Agents can also search and read this documentation through its [MCP server](https://docs.does.qa/~gitbook/mcp).

# Store Element Count

Save the count of elements returned from a specific element selector into the value store.

Store Element Count reads how many [Elements](https://docs.does.qa/elements/creating-elements.md) match a selector and saves that number in the [Value Store](https://docs.does.qa/values/value-store.md). Use it when a later step or check needs a live count from the page.

![Store element count Test Step](https://static.does.qa/assets/nodes/data_store_elementCount.png)

## When to use it

* Capture how many rows, cards, or list items appear after a filter or search.
* Store a count for a [Check value](https://docs.does.qa/test-steps/check/check-value.md) or API payload built from a [Value](https://docs.does.qa/values/value-store.md).
* Prefer [Store element text](https://docs.does.qa/test-steps/data/store-element-text.md) when you need visible text from one item.

## Configure

### Basics

| Field            | What to set                                                                         |
| ---------------- | ----------------------------------------------------------------------------------- |
| **Element**      | The [Element](https://docs.does.qa/elements/creating-elements.md) selector to count |
| **Storage Name** | Name later steps will use in the Value Store                                        |

### Advanced

| Field              | What to set                                                              |
| ------------------ | ------------------------------------------------------------------------ |
| **Status on fail** | [Failed Status](https://docs.does.qa/test-step-options/failed-status.md) |

## Related

* [Store element text](https://docs.does.qa/test-steps/data/store-element-text.md)
* [Store element value](https://docs.does.qa/test-steps/data/store-element-value.md)
* [Store element attribute](https://docs.does.qa/test-steps/data/store-element-attribute.md)
* [Store element HTML](https://docs.does.qa/test-steps/data/store-element-html.md)
* [Data](https://docs.does.qa/test-steps/data.md)

**Tags:** `data`, `store`, `elementCount`, `element`, `count`, `scrape`
