Were M2 and M4 written by a film editor , edited by a director of a film , and written by M3
SELECT count(*) WHERE {
?x0 a ns:film.editor .
?x1 ns:film.director.film ?x2 .
?x2 a ns:film.film .
M2 ns:film.film.edited_by ?x1 .
M2 ns:film.film.written_by ?x0 .
M2 ns:film.film.written_by M3 .
M4 ns:film.film.edited_by ?x1 .
M4 ns:film.film.written_by ?x0 .
M4 ns:film.film.written_by M3
}