Revert "quick adjustment of the get_product_count function"

This reverts commit adf28f7c051807fdbeb28aa85a30d25e30e2ebab.