Did M1 write a film , direct a film , and write M2
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x1 a ns:film.film .
M1 ns:film.director.film ?x1 .
M1 ns:film.writer.film ?x0 .
M1 ns:film.writer.film M2
}