Were M3 and M4 edited and produced by a character that M2 was directed by and M1 was written by
SELECT count(*) WHERE {
?x0 a ns:fictional_universe.fictional_character .
?x0 ns:film.director.film M2 .
?x0 ns:film.writer.film M1 .
M3 ns:film.film.edited_by ?x0 .
M3 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M4 ns:film.film.edited_by ?x0 .
M4 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}