Was M0 's sequel written by and produced by a film director that M2 was written by and starred
SELECT count(*) WHERE {
?x0 ns:film.film.prequel M0 .
?x0 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
?x0 ns:film.film.written_by ?x1 .
?x1 a ns:film.director .
?x1 ns:film.actor.film/ns:film.performance.film M2 .
?x1 ns:film.writer.film M2
}