Was M2 produced by a film distributor and written by M0 's cinematographer , producer , and art director
SELECT count(*) WHERE {
?x0 ns:film.cinematographer.film M0 .
?x0 ns:film.film_art_director.films_art_directed M0 .
?x0 ns:film.producer.film|ns:film.production_company.films M0 .
?x1 a ns:film.film_distributor .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
M2 ns:film.film.written_by ?x0
}