Was M2 directed by M3 , directed by a screenwriter , and written by a film editor
SELECT count(*) WHERE {
?x0 a ns:film.editor .
?x1 a ns:film.writer .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.directed_by M3 .
M2 ns:film.film.written_by ?x0
}