Make simple counting faster