---
schema_version: "1"
id: dc31fc24340d23d2ff546cb42a822cf4f90b82a99ae5a9a232cf7978470fb783
title: DataExtensionRowCount()
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-de-row-count.md
canonical_url: https://developer.salesforce.com/docs/marketing/marketing-cloud-ampscript/references/mc-ampscript-data-extension/mc-ampscript-reference-data-extension-de-row-count.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 073315257b594f280b64d7c89da5db463324ff94ba5c938af9f5ee772a856d82
products:
  - AMPscript for Marketing Cloud
  - Marketing Cloud
---
# DataExtensionRowCount()

Returns the number of rows in a data extension.

## Availability

<table>
  <tr>
    <td>Marketing Cloud Engagement</td>
    <td>✅ Yes</td>
  </tr>
  <tr>
    <td>Marketing Cloud Next</td>
    <td>❌ No</td>
  </tr>
</table>

## Syntax

```
DataExtensionRowCount(dataExtensionName)
```

The `DataExtensionRowCount()` has one parameter:

- `dataExtensionName` (string): Required. The name of the data extension to find the row count of.

## Usage

This example uses a data extension called "MembershipRewardsProgramme," which contains the data in this table.

| MemberId | FirstName | Surname    | RewardsPoints | RewardsTier | Area        |
| -------- | --------- | ---------- | ------------- | ----------- | ----------- |
| 1        | Dennis    | Smithers   | 92374         | 2           | Chelsea     |
| 2        | Pooja     | Chatterjee | 201042        | 1           | Hammersmith |
| 3        | Tomás     | Santos     | 69311         | 3           | Kensington  |
| 4        | Sun-Hi    | Kim        | 23999         | 4           | Twickenham  |
| 5        | Jian      | Yeh        | 15123         | 4           | Chelsea     |

To use the function, pass it the name of the data extension.

```
%%[
  Var @deRows
  Set @deRows = DataExtensionRowCount("MembershipRewardsProgramme")
  Output(v(@deRows))
]%%
```

The function returns the number of rows in the specified data extension, `5`.
