Did M1 's sequel 's art director produce and write M0 's prequel
SELECT count(*) WHERE {
?x0 ns:film.film_art_director.films_art_directed ?x1 .
?x0 ns:film.producer.film|ns:film.production_company.films ?x2 .
?x0 ns:film.writer.film ?x2 .
?x1 ns:film.film.prequel M1 .
?x2 ns:film.film.sequel M0
}