Were M3 and M4 executive produced by a art director , executive produced by M1 's star , and written by M2 's writer
SELECT count(*) WHERE {
?x0 a ns:film.film_art_director .
?x1 ns:film.actor.film/ns:film.performance.film M1 .
?x2 ns:film.writer.film M2 .
M3 ns:film.film.executive_produced_by ?x0 .
M3 ns:film.film.executive_produced_by ?x1 .
M3 ns:film.film.written_by ?x2 .
M4 ns:film.film.executive_produced_by ?x0 .
M4 ns:film.film.executive_produced_by ?x1 .
M4 ns:film.film.written_by ?x2
}