get count of unique values in column mysql code example
Example: mysql unique select count
SELECT COUNT(DISTINCT productId) from table_name WHERE keyword='$keyword'
SELECT COUNT(DISTINCT productId) from table_name WHERE keyword='$keyword'