Чтобы понять, почему так происходит, сравните результаты вот этих запросов:
SELECT t.*, o.id
FROM tasks AS t
LEFT JOIN offers AS o ON o.task_id = t.id
WHERE (t.city_id = 1 AND t.status = 1)
AND (o.user_id <> 2 AND o.status NOT IN(1,2));
SELECT t.*, o.id
FROM tasks AS t
LEFT JOIN offers AS o ON o.task_id = t.id
WHERE (t.city_id = 1 AND t.status = 1);
Чтобы это исправить, перенесите все условия для offers из WHERE в LEFT JOIN (
пример на SqlFiddle):
SELECT t.*, COUNT(o.id) AS count_o
FROM tasks AS t
LEFT JOIN offers o ON o.task_id=t.id AND o.user_id <> 2 AND o.status NOT IN(1,2)
WHERE (t.city_id = 1 AND t.status = 1)
GROUP BY t.id;
Подробнее:
dev.mysql.com/doc/refman/5.7/en/left-join-optimiza...