You can try this , its another variation of what you are trying to achieve.
select
p.id,
p.name,
coalesce (sum(`tot`),0) as `count`
from products p
inner join
(
select
sum(qty) as `tot`,
productid
from orders_products
inner join `orders` on `orders`.`id` = orders_products.orderid
where `orders`.status = 9
group by productid
)t
on p.id = t.productid
group by p.id
order by `count`