Did a film director that M2 was directed by and produced by write M0 and M1
SELECT count(*) WHERE {
?x0 ns:film.director.film M2 .
?x0 ns:film.producer.film|ns:film.production_company.films M2 .
?x0 ns:film.writer.film M0 .
?x0 ns:film.writer.film M1
}