Update counter.