Was M3 directed by M4 , written by a male actor of M0 , and written by M2 's cinematographer
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.character M0 .
?x0 ns:people.person.gender ns:m.05zppz .
?x1 ns:film.cinematographer.film M2 .
M3 ns:film.film.directed_by M4 .
M3 ns:film.film.written_by ?x0 .
M3 ns:film.film.written_by ?x1
}