---
title: "wordCount(for:)"
framework: sensorkit
role: symbol
role_heading: Instance Method
path: "sensorkit/srkeyboardmetrics/wordcount(for:)"
---

# wordCount(for:)

Provides the number of typed words for the specified sentiment in the report.

## Declaration

```swift
func wordCount(for category: SRKeyboardMetrics.SentimentCategory) -> Int
```

## Parameters

- `category`: An estimation of the user’s demeanor.

## Return Value

Return Value The total number of typed words for a sentiment.

## See Also

### Inferring Sentiment

- [emojiCount(for:)](sensorkit/srkeyboardmetrics/emojicount(for:).md)
- [SRKeyboardMetrics.SentimentCategory](sensorkit/srkeyboardmetrics/sentimentcategory.md)
