Were M3 , M5 , and M6 executive produced by a film producer that executive produced M1 and M2 and written by M4
SELECT count(*) WHERE {
?x0 a ns:film.producer .
?x0 ns:film.producer.films_executive_produced M1 .
?x0 ns:film.producer.films_executive_produced M2 .
M3 ns:film.film.executive_produced_by ?x0 .
M3 ns:film.film.written_by M4 .
M5 ns:film.film.executive_produced_by ?x0 .
M5 ns:film.film.written_by M4 .
M6 ns:film.film.executive_produced_by ?x0 .
M6 ns:film.film.written_by M4
}