refactor updateCount to use handlebars template helper