---
sourceDocument: Brazil Workflow Data Fabric
sourceDocumentLink: https://www.servicenow.com/docs/r/integrate-applications

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Workflow Data Fabric

ft:clusterId :

    - crint

bundleId :

    - crint

workflow :

    - Creator


---

# getRowCount()

# API -- getRowCount() {#ariaid-title1}

Release version: Brazil  
Updated October 22, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 1 minute to read  
Returns the total number of rows that a Zero Copy Connector for ERP model operation would return, without retrieving the records themselves.
Use getRowCount() as a terminal method in place of execute() when you need only a count. You configure the query the same way you would for a normal run, then call
getRowCount() instead.

For detailed information, see [GlideAggregate - Scoped](https://www.servicenow.com/docs/access?context=c_GlideAggregateScopedAPI&version=brazil&pubname=brazil-api-reference&ft:locale=en-US).

## How the count is determined {#erp-api-getrowcount__section-getrowcount-behavior}

The count is protocol-specific:
{#erp-api-getrowcount__table-getrowcount-protocols__entry__2}

| Protocol | Source of the count |
|-|-|
| Read table | Total record count reported in the connector response metadata. |
| OData | The OData count endpoint. Supported for both direct execution and execution through a MID Server. |
| BAPI | Uses the default fallback. SAP provides no native count capability for BAPI calls. |
| REST | Uses the default fallback. |
| Default fallback | Counts the items actually returned in the response, which is equivalent to counting the rows that would land in a remote table. |
[Table 1. Row count behavior by protocol]

{#erp-api-getrowcount__table-getrowcount-protocols}

## Related methods {#erp-api-getrowcount__section-getrowcount-related}

The same count behavior is available at two lower levels. The query engine exposes a row count method alongside its execute method. The API handler provides count methods that accept either an encoded query or a JSON filter,
parallel to its existing query and filter methods.

## Limitations {#erp-api-getrowcount__section-getrowcount-limitations}

For REST services, designating a specific response field as the count is not supported.

