Was a writer and cinematographer of M1 a person that M2 was directed by
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.cinematographer.film M1 .
?x0 ns:film.director.film M2 .
?x0 ns:film.writer.film M1
}