Was M2 executive produced by M0 's sequel 's executive producer and written by a film director
SELECT count(*) WHERE {
?x0 ns:film.producer.films_executive_produced ?x1 .
?x1 ns:film.film.prequel M0 .
?x2 a ns:film.director .
M2 ns:film.film.executive_produced_by ?x0 .
M2 ns:film.film.written_by ?x2
}