Were M2 and M5 written by M0 's executive producer , produced by a actor , and written by M3 and M4
SELECT count(*) WHERE {
?x0 ns:film.producer.films_executive_produced M0 .
?x1 a ns:film.actor .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
M2 ns:film.film.written_by ?x0 .
M2 ns:film.film.written_by M3 .
M2 ns:film.film.written_by M4 .
M5 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
M5 ns:film.film.written_by ?x0 .
M5 ns:film.film.written_by M3 .
M5 ns:film.film.written_by M4
}