# COUNT

```
COUNT(*) AS total
```

Returns the number of records returned by a query or the records in a group as a result of a `GROUP BY` statement.

Available in:

| Processor (stateless) | Processors (stateful) | SQL Studio |
| --------------------- | --------------------- | ---------- |
| ✓                     | ✓                     | ✓          |

*Sample code:*

```sql
USE `kafka`;
SELECT COUNT(id) 
FROM orders-events
```

*Output:*

```json
{
  "value": {
    "COUNT": 1000
  }
}
```
