for another answer about this type of question this is my another answer for getting count of product base on product name distinct like this sample below:
select * FROM Product
SELECT DISTINCT(Product_Name),
(SELECT COUNT(Product_Name)
from Product WHERE Product_Name = Prod.Product_Name)
as `Product_Count`
from Product as Prod
Record Count: 4; Execution Time: 2ms