updating counting