quick adjustment of the get_product_count function