Describe the bug
System information (please complete the following information)
Joomla version: 3.8
Yes, count() works on 5 and 7, in fact it was added long tim before 5.
FWIW this could also be fixed in the template but I think it's good to fix it at the source as other templates have same issue (eg Kvivid)