Were M2 , M4 , and M5 edited by a screenwriter , written by M0 's actor , and directed by M3
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.character M0 .
?x1 a ns:film.writer .
M2 ns:film.film.directed_by M3 .
M2 ns:film.film.edited_by ?x1 .
M2 ns:film.film.written_by ?x0 .
M4 ns:film.film.directed_by M3 .
M4 ns:film.film.edited_by ?x1 .
M4 ns:film.film.written_by ?x0 .
M5 ns:film.film.directed_by M3 .
M5 ns:film.film.edited_by ?x1 .
M5 ns:film.film.written_by ?x0
}