Setting up the counter.