support "if ($falseOnEmptyArray)" and "count($array)" in templates