counter works every time