Skip to content Skip to footer navigation

Word Count Modifier

Returns the number of words in a given string.

string: There are probably seven words in this sentence.
{{ string | word_count }}
{{ Statamic::modify($string)->wordCount() }}
8