# IReaderTokenCounter

Counts tokens for deterministic chunk budgeting.

Interface 

`OfficeIMO.Reader`

**Namespace**

`OfficeIMO.Reader`

**Assembly**

`OfficeIMO.Reader.Core`

**Source revision**

`90fbca630045` with working tree changes

**Source**

[ReaderTokenCounters.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/90fbca6300454f4c57161551de8649ac9ee04cbd/OfficeIMO.Reader.Core/ReaderTokenCounters.cs#L7)

**Modifiers**

abstract

Counts tokens for deterministic chunk budgeting.

## Remarks

Implementations used concurrently must be thread-safe. Counts must be deterministic and non-negative.

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Reader and Extraction](/docs/reader/) Guide
  
  Deterministic document extraction, rich results, structured records, RAG chunking, and optional OCR with OfficeIMO.Reader.

## Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 1

- Property [ReaderHierarchicalChunkingOptions.TokenCounter](/api/reader/officeimo-reader-readerhierarchicalchunkingoptions/#property-tokencounter)

Filter members 

Show inherited

## Methods

`public abstract int CountTokens(string text)` [#](#method-counttokens-string)

Counts tokens in the supplied text.

Parameters

**text string required**

Returns

`int`

## Properties

`public abstract string Id { get; }` [#](#property-id)

Stable counter identifier retained in chunking evidence.

<!-- PowerForge markdown artifact sha256:1D1BDCC49CFFD5603C568DA20AB10A43C4E73C180C1487A90DD3455471F56E91 -->
