# Token counter telemetry

> Understand token-count precision in each result.

Read token_counter_used and handle the heuristic fallback appropriately.

Category: API Reference · Updated: September 2026 · 2 min read

## Inspect the counter

token_counter_used reports the process-level active counter: tiktoken or heuristic.

```python
from llmslim import compress
result = compress(long_text)
print(result.token_counter_used)
```

## FAQ

### When is the heuristic used?

When the process cannot load the tiktoken encoder. LLMSlim emits one warning per process.

## Related

- [Getting Started](https://www.llmslim.app/docs/getting-started.md)

Canonical page: https://www.llmslim.app/docs/telemetry
