Was M3 a film produced by a cinematographer that wrote M1 and M2
SELECT count(*) WHERE {
?x0 a ns:film.cinematographer .
?x0 ns:film.writer.film M1 .
?x0 ns:film.writer.film M2 .
M3 a ns:film.film .
M3 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}