Did M2 write M3 and produce a film whose costume designer edited M1
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x0 ns:film.film.costume_design_by ?x1 .
?x1 ns:film.editor.film M1 .
M2 ns:film.producer.film|ns:film.production_company.films ?x0 .
M2 ns:film.writer.film M3
}