add a counter for number of panics