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