Did M2 star a actor of M0 and M1 and star M3
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.character M0 .
?x0 ns:film.actor.film/ns:film.performance.character M1 .
M2 ns:film.film.starring/ns:film.performance.actor ?x0 .
M2 ns:film.film.starring/ns:film.performance.actor M3
}