> For the complete documentation index, see [llms.txt](https://docs.origami.tech/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.origami.tech/reference/grid-language/functions/count.md).

# count()

count() returns the number of elements in a list — for example, the number of asks in the order book.

Learn how to use the Count function in Origami Tech to count data entries, signal events, or conditions within your automated strategies.

## `count`(*list*\[*Any*]) -> *int*

Returns the number of list elements

<details>

<summary>Example:</summary>

`count([orderbook().ask])` → `50`

`count([ask.price for ask in orderbook().ask if ask.price < 1200])` → `23`

</details>
