countTokens
Counts tokens by splitting on whitespace and common punctuation.
The implementation adds a small overhead factor (1.1x) to account for special tokens and tokenization differences in actual LLM tokenizers.
Return
The estimated number of tokens in the text
Parameters
text
The text to tokenize