Maybe adjust your query to something like:
SELECT DISTINCT * FROM products WHERE category='food'
UNION
SELECT DISTINCT * FROM products WHERE categorydos='food'
which gives you the count of unique items (no duplicate records)
Now you can then get the count from this by various means (such as making this into a SQL subquery or via the PHP.