reset counter when we the type or period changes; #1