Were M1 and M4 directed by M2 and M3 and written by a director of M0 's sequel
SELECT count(*) WHERE {
?x0 ns:film.director.film ?x1 .
?x1 ns:film.film.prequel M0 .
M1 ns:film.film.directed_by M2 .
M1 ns:film.film.directed_by M3 .
M1 ns:film.film.written_by ?x0 .
M4 ns:film.film.directed_by M2 .
M4 ns:film.film.directed_by M3 .
M4 ns:film.film.written_by ?x0
}