Was M4 executive produced and produced by a film director that wrote M1 and wrote M2 and M3
SELECT count(*) WHERE {
?x0 a ns:film.director .
?x0 ns:film.writer.film M1 .
?x0 ns:film.writer.film M2 .
?x0 ns:film.writer.film M3 .
M4 ns:film.film.executive_produced_by ?x0 .
M4 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}