add count to template