When you count breaths during zazen do you restart everytime a thought arises other than the counting? Or do you restart when you lose your place because you are trapped in rising thoughts?

Dave