<!-- Generated by scripts/gen-docs.mts from the JSDoc in registry/. Do not edit; run `pnpm run docs`. -->

# createUseCounts

Counts, from real use, the moments a person got stuck, so an agent has evidence from people's use. Counts only, and off by default: nothing is recorded until you call `enable()`, nothing leaves the page unless your own `onReport` sends it, and a report has no field for content or an identifier. Ouro UI has no collector and this reads and writes no storage, cookie or network.

```tsx
import { createUseCounts } from "@/lib/ouro/use-counts";
```

## Example

```tsx
const counts = createUseCounts({ onReport: (report) => myAnalytics.send(report) });
if (userAgreedToCounts) counts.enable();
counts.record("disabled-press", { screen: "checkout", part: "pay-button" });
counts.flush();
```

## Usage

Use it when you want evidence of where people get stuck in a shipped app.

## Use instead when

- Use Ouro check's `--handoff` kit instead when you can put a person in front of the app.

## Parameters

| Parameter | Type | Default |
| --- | --- | --- |
| `options` | `UseCountsOptions` | `{}` |

## Returns

`UseCounts`
