That's because you are using an Aggregate Function without a GROUP BY clause : ie. count(*)
It is legitimate to use aggregate functions without a group by clause as long as there are no non-aggregated columns in the select list. (Which is the case in my query.)
Probably pblancher is using an outdated Mysql version that does not support scalar subqueries.
select t.id, productname, count(distributer_id) as d, count(store_id) as s
from mi_inventor_products as ti
left join mi_distributor_products as td on ti.id=td.product_id
left join mi_store_products as ts on ti.id=ts.product_id
group by ti.id
This will not get the correct result. For instance, if a product have 2 distributors and 3 stores selling it, both counts will be 6 as you are joining all tables.
If you can't use subqueries you need to do a query for each count.
select 'distributors', ti.id, productname, count(distributer_id) as d
from mi_inventor_products as ti
left join mi_distributor_products as td on ti.id=td.product_id
group by ti.id
union
select 'stores', ti.id, productname, count(store_id) as s
from mi_inventor_products as ti
left join mi_store_products as ts on ti.id=ts.product_id
group by ti.id
union requires 4.0. So if you are on an even older version you have to do two separate selects.