Were M3 and M1 directed by a cinematographer , edited by M1 's producer , and edited by M0 's writer
SELECT count(*) WHERE {
?x0 ns:film.writer.film M0 .
?x1 ns:film.producer.film|ns:film.production_company.films M1 .
?x2 a ns:film.cinematographer .
M1 ns:film.film.directed_by ?x2 .
M1 ns:film.film.edited_by ?x0 .
M1 ns:film.film.edited_by ?x1 .
M3 ns:film.film.directed_by ?x2 .
M3 ns:film.film.edited_by ?x0 .
M3 ns:film.film.edited_by ?x1
}