rewrote counts