COUNT_STAR operation error in PIG

Hi,

I am trying to get the count of distinct product names from ‘products’ table present in ‘pig_demo’ hive database.
It works fine till obtaining the distinct product names but failing at getting count. Please help to get out of this.

products = LOAD ‘pig_demo.products’ USING org.apche.hive.hcatalog.pig.HCatLoader();

product_name = FOREACH products GENERATE product_name as productname;

product_name_distinct = DISTINCT product_name;

dump product_name_distinct;

product_name_count = FOREACH product_name_distinct GENERATE COUNT_STAR(product_name);

Error:
ERROR 0: org.apache.pig.backend.executionengine.ExecException: ERROR 2106: Error while computing count in COUNT_STAR
ERROR:
Input(s):
Failed to read data from “pig_demo.products”

There is typo in the class name. It should be org.apache.hive.hcatalog.pig.HCatLoader()