Were M2 and M5 edited by a person that wrote M1 and edited by M3 and M4
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.writer.film M1 .
M2 ns:film.film.edited_by ?x0 .
M2 ns:film.film.edited_by M3 .
M2 ns:film.film.edited_by M4 .
M5 ns:film.film.edited_by ?x0 .
M5 ns:film.film.edited_by M3 .
M5 ns:film.film.edited_by M4
}