move logic from updateCount into the view rendering routine

update footer template to support declarative task stats rendering

adjust if block formatting

remove unnecessary escaping from the footer template

adjust variable declaration statements

adjust indentation in the footer template