fix api categories counts