Did M0 executive produce M3 and M4 , write M1 , produce M5 , and write M2
SELECT count(*) WHERE {
M0 ns:film.producer.films_executive_produced M3 .
M0 ns:film.producer.films_executive_produced M4 .
M0 ns:film.producer.film|ns:film.production_company.films M5 .
M0 ns:film.writer.film M1 .
M0 ns:film.writer.film M2
}