# format_token_count

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/_session_stats/format_token_count)

Format a token count into a human-readable short string.

## Signature

```python
format_token_count(
    count: int,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `count` | `int` | Yes | Number of tokens. |

## Returns

`str`

Formatted string like `'12.5K'`, `'1.2M'`, or `'500'`.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/_session_stats.py#L101)