Adding cast to int for products count to quiet warnings