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