Did M1 write M2 and produce a prequel of M0 's sequel
SELECT count(*) WHERE {
?x0 ns:film.film.sequel ?x1 .
?x1 ns:film.film.prequel M0 .
M1 ns:film.producer.film|ns:film.production_company.films ?x0 .
M1 ns:film.writer.film M2
}