SELECT COUNT(*) FROM SPYquartup1.prodmovi AS m FORCE KEY (key1) LEFT JOIN SPYquartup1.prodorfafas AS f ON f.serie_orfa=m.serie_orfa AND f.of=m.of AND f.fase=m.fase AND f.id_tenant=m.id_tenant  LEFT JOIN SPYquartup1.promoper AS o ON o.cod_operacion=f.cod_operacion AND o.id_tenant=f.id_tenant  WHERE m.serie_orfa=prodorfa.serie_orfa AND m.of=prodorfa.of AND f.cod_operacion='COH' AND m.id_tenant=prodorfa.id_tenant