Was M2 produced by a character and produced by M1 's producer , writer , and director
SELECT count(*) WHERE {
?x0 a ns:fictional_universe.fictional_character .
?x1 ns:film.director.film M1 .
?x1 ns:film.producer.film|ns:film.production_company.films M1 .
?x1 ns:film.writer.film M1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x1
}