Count keyword frequency in a text.
Raw frequency counts in English are dominated by function words — the, of, and, to — which carry grammar rather than meaning, so any useful frequency analysis filters them out. Two filters do most of the work: a minimum word length, since short words are overwhelmingly functional, and an explicit stop-word list for the common four-letter-plus exceptions like that, which and their. What remains is the content vocabulary. The ratio of distinct terms to analysed words is a useful secondary signal: a low ratio indicates repetitive vocabulary, a high one indicates varied or possibly unfocused writing.
Filtering
Keep words at or above the minimum length, excluding stop words if enabled
Relative frequency
Frequency % = uses of the term / analysed words x 100
Because they always win on raw count and tell you nothing. In any English text the top ten words by frequency are function words carrying grammatical rather than topical information. Filtering them is what makes the remaining counts reflect what the document is actually about.
Lexical variety. A low ratio of distinct terms to total words means heavy repetition, which can indicate either tight focus or padding. A high ratio means varied vocabulary, which can indicate richness or a lack of a clear central subject. Compare it against similar documents rather than in isolation.