# Data Record Count

{% hint style="info" %}
**Block Information**

Available in: Page Flow and Cloud Flow

Toolbox Category: Data

Block Type: [Output](https://docs.zingy.ai/app-editor/block-anatomy#output-block)

Output Type: [*numeric*](https://docs.zingy.ai/app-editor/page-flow/references/value-types)
{% endhint %}

**`Data Record Count`** is an [output block](https://docs.zingy.ai/app-editor/block-anatomy#output-block) that provides the count of [records](https://docs.zingy.ai/data/database-tables#table-records) read by the [Data Read](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read), [Data Read Next Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-next) and [Data Read Previous Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-previous) blocks.

{% hint style="warning" %}
NOTE: This block will provide valid values only after the [Data Read](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read), [Data Read Next Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-next) and [Data Read Previous Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-previous) blocks complete their execution. The [Data Status](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-status) block can be used to track the completion.
{% endhint %}

<div align="left"><figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FUnlWRjsDBt3dKmdEDbZd%2Fimage.png?alt=media&#x26;token=57b228a8-8858-4a0c-a6e3-c9877af4583f" alt="" width="312"><figcaption><p>Data Record Count block</p></figcaption></figure></div>

The block consists of the following (from top to bottom):

* *Table:* [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value representing the name of the [Database Table](https://docs.zingy.ai/app-editor/data/database-tables) .
* *Dataset Name:* [Value Parameter](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) that accepts a [*text*](https://docs.zingy.ai/app-editor/page-flow/references/value-types) value representing the name of the dataset on which a database read was conducted using the [Data Read](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read), [Data Read Next Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-next) and [Data Read Previous Page](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-read-previous) blocks.

***

## Usage Example

{% hint style="info" %}
**NOTE: Please refer to the prerequisite information shown** [**here**](https://docs.zingy.ai/app-editor/page-flow/references/prerequisite-for-data-examples) **before seeing the example.**&#x20;
{% endhint %}

The image below shows an example of the **`Data Record Count`** block. This example incorporates the *Usage Example* function, as outlined in the [Database Reading Logic for examples section](https://docs.zingy.ai/app-editor/references/prerequisite-for-data-examples#database-reading-logic-for-examples) on the prerequisite information page mentioned above.

<figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FbhVylr45xw4tTMr256nC%2Fimage.png?alt=media&#x26;token=d627ed68-c10a-41a2-b2ce-78c50e0da726" alt=""><figcaption><p>Example of <strong><code>Data Read Count</code></strong> block</p></figcaption></figure>

In this example, the [Show Information Popup](https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/show-information-popup) block is used to display the number of [records](https://docs.zingy.ai/data/database-tables#table-records) that were read using the Data Read Count block. The *Customers* [Database Table](https://docs.zingy.ai/app-editor/data/database-tables) along with the dataset name of *ds1* are used for the  [Value Parameters](https://docs.zingy.ai/app-editor/block-anatomy#value-parameters) .

The result for the above example is shown in the image below.

<figure><img src="https://3401585094-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmnBepgycwgisXr9ya1N4%2Fuploads%2FlKkTNJBjnbHzpVLqmitJ%2Fimage.png?alt=media&#x26;token=771f25a1-cd73-46be-ade0-1b8f0033d562" alt=""><figcaption><p>Result of the example for the Data Record Count block</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zingy.ai/app-editor/page-flow/toolbox-blocks/data-record-count.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
