Did M2 produce M0 's prequel , edit M3 , and direct M1 's sequel
SELECT count(*) WHERE {
?x0 ns:film.film.sequel M0 .
?x1 ns:film.film.prequel M1 .
M2 ns:film.director.film ?x1 .
M2 ns:film.editor.film M3 .
M2 ns:film.producer.film|ns:film.production_company.films ?x0
}