Возвращает количество слов.
Пример 5-7. count_words
index.php: $smarty = new Smarty; $smarty->assign('articleTitle', 'Dealers Will Hear Car Talk at Noon.'); $smarty->display('index.tpl'); index.tpl: {$articleTitle} {$articleTitle|count_words} OUTPUT: Dealers Will Hear Car Talk at Noon. 7
См. также count_characters, count_paragraphs и count_sentences