Did M5 's distributor and producer write M0 , produce M1 and M2 , and produce M3 and M4
SELECT count(*) WHERE {
?x0 ns:film.film_distributor.films_distributed/ns:film.film_film_distributor_relationship.film M5 .
?x0 ns:film.producer.film|ns:film.production_company.films M1 .
?x0 ns:film.producer.film|ns:film.production_company.films M2 .
?x0 ns:film.producer.film|ns:film.production_company.films M3 .
?x0 ns:film.producer.film|ns:film.production_company.films M4 .
?x0 ns:film.producer.film|ns:film.production_company.films M5 .
?x0 ns:film.writer.film M0
}