add stats counting