Did a film 's prequel and sequel star M0 and M1 and star M2
SELECT count(*) WHERE {
?x0 ns:film.film.prequel ?x1 .
?x0 ns:film.film.sequel ?x1 .
?x0 ns:film.film.starring/ns:film.performance.actor M0 .
?x0 ns:film.film.starring/ns:film.performance.actor M1 .
?x0 ns:film.film.starring/ns:film.performance.actor M2 .
?x1 a ns:film.film
}