---
title: "numRows"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:numrows@main"
source: "Functions/Numrows.rst"
rendered: "2026-09-17T17:01:35+00:00"
---

# numRows {#numrows-1}

This object allows you to specify a `SELECT` query, which will be
executed in the database. The object then returns the number of
rows, which were returned by the query.

-   [Properties](https://docs.typo3.org/permalink/t3tsref:properties@main)
-   [Example](https://docs.typo3.org/permalink/t3tsref:example@main)

## Properties {#properties}

### table {#table}

-   **table**

    -   *Type:* Table name

    Name of the database table to query.

### select {#select}

-   **select**

    -   *Type:* [select](https://docs.typo3.org/permalink/t3tsref:select@main)

    Select query for the operation.

    The sub-property `selectFields` is overridden internally with
    `count(*)`.

## Example {#example}

Get the number of content elements within certain `colPos` of the current
page.

**EXT:site_package/Configuration/Sets/Main/setup.typoscript**

```typoscript
10 = FLUIDTEMPLATE
10 {
  variables {
    numberOfContentElementsInColPosOne = TEXT
    numberOfContentElementsInColPosOne.numRows {
      table = tt_content
      select.where = {#colPos}=1
    }
  }
}

```
