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