counter works correctly

It was actually broken for all hidden layers in all modes.