> ## Documentation Index
> Fetch the complete documentation index at: https://kk-83bff226.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# countWords

> Counts the number of words in a string.

## Signature

```typescript path=null start=null theme={null}
countWords(str: string): number
```

## Parameters

* **str**: `string` - The string to count words in.

## Returns

`number` - The number of words in the string.

## Source

Defined in [string.ts:13](https://github.com/koji/ichigyou/blob/main/src/string.ts#L13)
