made counter also emit when its value changes