This is used to count the number of words in a variable. 计算变量里的词数 。
Example 5-7. count_words
index.PHP:
$smarty =newSmarty;
$smarty->assign('articleTitle','Dealers Will Hear Car Talk at Noon.');
$smarty->display('index.tpl');
index.tpl:{$articleTitle}{$articleTitle|count_words}
OUTPUT:DealersWillHearCarTalk at Noon.7