---
title: "Count Rows"
description: "The $count system query option with the value true answers how many rows a request would retrieve, without retrieving them."
language: en
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/en/docs/invantive-bridge-online/examples/count-rows
original: https://documentation.invantive.eu/en/docs/invantive-bridge-online/examples/count-rows
updated: 2026-08-31T00:00:00Z
license: https://documentation.invantive.eu/en/
---

The `$count` system query option with the value `true` answers how many rows a request would retrieve, without retrieving them.

## Request
```text
GET .../odata4/ExactOnlineREST.Financial.GLAccountsBulk@eol?$count=true
```

## Answer
The answer is the number itself, as the whole body:
```text
1284
```
This differs from the OData standard, which asks for a collection carrying `@odata.count` beside the rows. A request on this service therefore asks either for the rows or for their number, never for both at once. The `/$count` path segment is not offered either; the system query option is the way.

## Counting a Selection
A filter counts with the request, so the number is the number of rows the same filter would retrieve:
```text
GET .../odata4/ExactOnlineREST.Financial.GLAccountsBulk@eol?$filter=Division eq 920474&$count=true
```

## Counting the Groups
Beside a grouping the number answered is the number of groups rather than the number of rows:
```text
GET .../odata4/ExactOnlineREST.Financial.GLAccountsBulk@eol?$apply=groupby((DivisionName),aggregate($count as Accounts))&$count=true
```
That makes it a cheap way to find out how large a grouped answer will be before asking for it. A `$top` next to it has no effect on the number, because the number of a collection is the number before a limit is taken from it.

## When To Use It
A row count is useful to size a download before starting it, and to check afterwards that a report received everything. It is not free: the platform still has to work out the number, and on a platform without a counting facility that means reading the rows. A count therefore counts against the [[Invantive Bridge Online/Fair Use Limits|Fair Use Limits]] like any other request.

## Release Notes

- [Invantive Bridge Online](/en/release-notes/products/invantive-bridge-online)
  - [26.0 to 27.0](/en/release-notes/products/invantive-bridge-online?step=26.0-to-27.0)
  - [25.0 to 26.0](/en/release-notes/products/invantive-bridge-online?step=25.0-to-26.0)

