Was M2 executive produced by M3 , directed by a character , and written by M0 's producer
SELECT count(*) WHERE {
?x0 ns:film.producer.film|ns:film.production_company.films M0 .
?x1 a ns:fictional_universe.fictional_character .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.executive_produced_by M3 .
M2 ns:film.film.written_by ?x0
}