Was M2 directed by a producer and star of M1 and produced by a film distributor
SELECT count(*) WHERE {
?x0 a ns:film.film_distributor .
?x1 ns:film.actor.film/ns:film.performance.film M1 .
?x1 ns:film.producer.film|ns:film.production_company.films M1 .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}