Did M1 and M3 executive produce a film , executive produce M2 , and write a film
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x1 a ns:film.film .
M1 ns:film.producer.films_executive_produced ?x1 .
M1 ns:film.producer.films_executive_produced M2 .
M1 ns:film.writer.film ?x0 .
M3 ns:film.producer.films_executive_produced ?x1 .
M3 ns:film.producer.films_executive_produced M2 .
M3 ns:film.writer.film ?x0
}