Was M2 written by M3 , edited by a screenwriter , and edited by M1 's director
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x1 ns:film.director.film M1 .
M2 ns:film.film.edited_by ?x0 .
M2 ns:film.film.edited_by ?x1 .
M2 ns:film.film.written_by M3
}