PROBLEM
When querying a feature or map service from the REST endpoint on ArcGIS Server, it is possible to use Result Record Count (resultrecordcount) to obtain a number of query results. However, when the Result Record Count parameter is specified and Return Count Only is set to True, the query count does not reflect the value set in Result Record Count.
This is a known limitation.
There are two ways to solve this issue:
SELECT * FROM Roads
Article ID: 000018863
Get help from ArcGIS experts
Download the Esri Support App