question: Was a cinematographer that directed , edited , and wrote M2 a screenwriter
query: SELECT count(*) WHERE {
  ?x0 a ns:film.cinematographer .
  ?x0 a ns:film.writer .
  ?x0 ns:film.director.film M2 .
  ?x0 ns:film.editor.film M2 .
  ?x0 ns:film.writer.film M2
  }