Was M4 written by a star and executive producer of M0 , M1 , and M2 and directed by a cinematographer
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.film M0 .
?x0 ns:film.actor.film/ns:film.performance.film M1 .
?x0 ns:film.actor.film/ns:film.performance.film M2 .
?x0 ns:film.producer.films_executive_produced M0 .
?x0 ns:film.producer.films_executive_produced M1 .
?x0 ns:film.producer.films_executive_produced M2 .
?x1 a ns:film.cinematographer .
M4 ns:film.film.directed_by ?x1 .
M4 ns:film.film.written_by ?x0
}