Fix next and count calls in Template::Pager class.