Was M2 edited by and written by a person that M1 was directed by , starred , and was edited by
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.actor.film/ns:film.performance.film M1 .
?x0 ns:film.director.film M1 .
?x0 ns:film.editor.film M1 .
M2 ns:film.film.edited_by ?x0 .
M2 ns:film.film.written_by ?x0
}