---
schema_version: "1"
id: be357a749d5585187957094e30265ab89bc7fd2f71daacc846373d880a5fa495
title: RowCount()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/marketing-cloud/ampscript/references/data-extension/mc-ampscript-reference-data-extension-row-count.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-row-count.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 68ea4f1e5fcdae05b3ea61b0136c18d2509c10ee31d5071921b7e6926e00eb5c
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# RowCount()

Returns the number of rows in a rowset, array, or object.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>✅ Yes</td>
  </tr>
</table>

This function became available in Marketing Cloud Next during the Summer ’26 release (API version 67.0).

## Syntax

```
RowCount(rowset)
```

The `RowCount()` function has one parameter:

- `rowset` (string): Required. The rowset or array to find the number of rows for.

## Usage

To use the function, pass it a rowset.

```
%%=RowCount(LookupRows('PostalCode','City','Indianapolis'))=%%
```

This example returns the number of rows in the `PostalCode` data extension where the `City` column contains the value "Indianapolis."
