number_of_words

Count the number of words in a string.

Specification

{{ text | number_of_words }}

Parameter Description Example Values
text (required) The text which you want the number of words counted. “the quick brown fox”

Examples

{{ "the quick brown fox" | number_of_words }}

Will produce 4.