Was M2 directed by a screenwriter , edited by M3 , and produced by a production company
SELECT count(*) WHERE {
?x0 a ns:film.production_company .
?x1 a ns:film.writer .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.edited_by M3 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}