Was a film 's prequel 's sequel 's prequel produced by M0 and M1
SELECT count(*) WHERE {
?x0 ns:film.film.produced_by|ns:film.film.production_companies M0 .
?x0 ns:film.film.produced_by|ns:film.film.production_companies M1 .
?x0 ns:film.film.sequel ?x1 .
?x1 ns:film.film.prequel ?x2 .
?x2 ns:film.film.sequel ?x3 .
?x3 a ns:film.film
}