---
title: "init(totalTokenCount:cachedTokenCount:)"
framework: foundationmodels
role: symbol
role_heading: Initializer
path: "foundationmodels/languagemodelsession/usage-swift.struct/input-swift.struct/init(totaltokencount:cachedtokencount:)"
---

# init(totalTokenCount:cachedTokenCount:)

Creates an input token count.

## Declaration

```swift
init(totalTokenCount: Int, cachedTokenCount: Int)
```

## Parameters

- `totalTokenCount`: The total number of input tokens from the transcript.
- `cachedTokenCount`: The number of input tokens served from a cache.
