Were M2 and M3 written by a film 's director and edited by M1 's editor and costume designer
SELECT count(*) WHERE {
?x0 ns:film.director.film ?x1 .
?x1 a ns:film.film .
?x2 ns:film.editor.film M1 .
?x2 ns:film.film_costumer_designer.costume_design_for_film M1 .
M2 ns:film.film.edited_by ?x2 .
M2 ns:film.film.written_by ?x0 .
M3 ns:film.film.edited_by ?x2 .
M3 ns:film.film.written_by ?x0
}