Were M1 , M2 , and M3 written , directed , and executive produced by a star and writer of a sequel of M0
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.film ?x1 .
?x0 ns:film.writer.film ?x1 .
?x1 ns:film.film.prequel M0 .
M1 ns:film.film.directed_by ?x0 .
M1 ns:film.film.executive_produced_by ?x0 .
M1 ns:film.film.written_by ?x0 .
M2 ns:film.film.directed_by ?x0 .
M2 ns:film.film.executive_produced_by ?x0 .
M2 ns:film.film.written_by ?x0 .
M3 ns:film.film.directed_by ?x0 .
M3 ns:film.film.executive_produced_by ?x0 .
M3 ns:film.film.written_by ?x0
}