Was M2 directed by a person and produced by a actor
SELECT count(*) WHERE {
?x0 a ns:film.actor .
?x1 a ns:people.person .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}