# COUNT

*noun*

say it: **“KOWNT”** **/kaʊnt/**

A SQL aggregate function that counts rows, or values that aren't NULL.

## What is **COUNT** in a relational database?

**COUNT** — An aggregate function returning the number of qualifying rows or non-NULL expression values.

```sql
SELECT customer_id, COUNT(*) AS order_count
FROM purchase_order
GROUP BY customer_id;
```

## In a sentence

- “**COUNT**(\*) told me Northwind has 77 products.”

Level: Apprentice · [More SQL terms at this level](https://www.ask-codey.com/glossary?category=sql&level=2)

Updated: November 9, 2026

Source: https://www.ask-codey.com/glossary/count
