Did M3 executive produce and write a film that was written by M1 and M2
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x0 ns:film.film.written_by M1 .
?x0 ns:film.film.written_by M2 .
M3 ns:film.producer.films_executive_produced ?x0 .
M3 ns:film.writer.film ?x0
}