<!-- source-hash: 95233cb5edc63b60b1c188abbbdfc1dc -->
Renders a row count label (e.g., "8 devices") for a data table, pulling the count from the table context or an explicit override.

## Key Components

- **`DataTableRowCount`** — Functional component that displays a formatted count with a singular/plural item label
- **`DataTableRowCountProps`** — Interface defining configuration options for the count display
- **`useDataTableContext`** — Hook consumed internally to read the current row model length

## Props

| Prop | Type | Default | Description |
|------|------|---------|-------------|
| `itemName` | `string` | `'result'` | Singular noun; auto-pluralized by appending `"s"` |
| `totalCount` | `number` | row model length | Override for server-paginated tables |
| `pluralize` | `(count, itemName) => string` | — | Custom pluralizer for irregular nouns |
| `hideWhenEmpty` | `boolean` | `true` | Hides the element when count is zero |
| `className` | `string` | — | Additional CSS classes |

## Usage Example

```typescript
// Basic usage — count from table context
<DataTable.RowCount itemName="device" />

// Server-paginated — pass total explicitly
<DataTable.Header
  rightSlot={
    <DataTable.RowCount
      itemName="device"
      totalCount={pageInfo.total}
    />
  }
/>

// Irregular pluralization
<DataTable.RowCount
  itemName="person"
  pluralize={(count, name) => count === 1 ? name : 'people'}
/>
```

> For server-paginated tables, always pass `totalCount` — the table context only tracks loaded rows, not the full dataset total.