Add counter to the index template, cleanup and test the index view.