> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> Counts the rows where neither `y` nor `x` is `NULL`.

# regr_count

## regr\_count

Introduced in: v26.9.0

Counts the rows where neither `y` nor `x` is `NULL`.

**Syntax**

```sql theme={null}
regr_count(y, x)
```

**Aliases**: `regrCount`

**Arguments**

* `y` — Dependent variable. [`(U)Int*`](https://clickhouse.com/docs/reference/data-types/int-uint) or [`Float*`](https://clickhouse.com/docs/reference/data-types/float)
* `x` — Independent variable. [`(U)Int*`](https://clickhouse.com/docs/reference/data-types/int-uint) or [`Float*`](https://clickhouse.com/docs/reference/data-types/float)

**Returned value**

Returns the number of non-null pairs. [`UInt64`](https://clickhouse.com/docs/reference/data-types/int-uint)

**Examples**

**Basic usage**

```sql title=Query theme={null}
SELECT regr_count(y, x)
FROM VALUES('x Float64, y Float64', (1, 2), (2, 4), (3, 6), (4, 8))
```

```response title=Response theme={null}
┌─regr_count(y, x)─┐
│                4 │
└──────────────────┘
```
