Was M0 a Mexican cinematographer that M2 starred and was written by
SELECT count(*) WHERE {
M0 a ns:film.cinematographer .
M0 ns:film.actor.film/ns:film.performance.film M2 .
M0 ns:film.writer.film M2 .
M0 ns:people.person.nationality ns:m.0b90_r
}