add class counter for unique id