Was M2 written by a star and writer of M0 and written by a cinematographer
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.film M0 .
?x0 ns:film.writer.film M0 .
?x1 a ns:film.cinematographer .
M2 ns:film.film.written_by ?x0 .
M2 ns:film.film.written_by ?x1
}