The $count system query option ignores any $top, $skip, or $expand query options, and returns the total count of results across all pages including only those results matching any specified $filter and $search
Will include "@odata.count": {NUMBER}, in the response with the total number of entries across all pages (taking into affect the $filter) which is really useful for paginated interfaces (data tables, etc). Implementations I've seen have been to issue a second select count(*) ... query.
Will include
"@odata.count": {NUMBER},
in the response with the total number of entries across all pages (taking into affect the$filter
) which is really useful for paginated interfaces (data tables, etc). Implementations I've seen have been to issue a secondselect count(*) ...
query.Specification: 11.2.5.5 System Query Option $count
Example: https://services.odata.org/Experimental/Northwind/Northwind.svc/Customers?$count=true&$top=5