count_words - pfaciana/latte-js GitHub Wiki
Used to count the number of words in a variable.
Template:
{$articleTitle = 'Dealers Will Hear Car Talk at Noon.'}
{$articleTitle}
{$articleTitle|count_words}
output:
Dealers Will Hear Car Talk at Noon.
7
see also count_words in PHP Smarty documentation.