Were M4 and M5 produced by a screenwriter and edited by a actor of M1 , M2 , and M3
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x1 ns:film.actor.film/ns:film.performance.character M1 .
?x1 ns:film.actor.film/ns:film.performance.character M2 .
?x1 ns:film.actor.film/ns:film.performance.character M3 .
M4 ns:film.film.edited_by ?x1 .
M4 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M5 ns:film.film.edited_by ?x1 .
M5 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}