bug with count and counter0 fixed