define private type counter using ctr_type
improve block counter performance
specialize index for K = 1