Was M1 's distributor and producer M0 's writer
SELECT count(*) WHERE {
?x0 ns:film.film_distributor.films_distributed/ns:film.film_film_distributor_relationship.film M1 .
?x0 ns:film.producer.film|ns:film.production_company.films M1 .
?x0 ns:film.writer.film M0
}