Open
Description
Currently, $count is only working on main collection endpoints, for example:
https://localhost:8086/odata/v1/Customers/$count
According to the OData 4 spec, it should be possible to append /$count
to any URL that returns a collection, for example, any non-unique primary key endpoints:
https://localhost:8086/odata/v1/Customers(State='WA')/$count
It should also be possible to apply filter criteria on the $count to return the count of entities matching filter criteria:
https://localhost:8086/odata/v1/Customers/$count($filter=State eq 'WA')
It should also be possible to use $count within a relation expansion that returns a collection, to determine the number of matching related entities:
https://localhost:8086/odata/v1/Customers?$expand=REL_Orders($count=true)
There are additional use cases, but some are based on conventions for expanding relations that we do not currently support. For example:
https://localhost:8086/odata/v1/Customers(1)/Orders/$count
Aha! Link: https://synergex.aha.io/features/HC-88