set counter.