auto update counter