question: Were M3 and M6 produced by a screenwriter that M1 and M2 were written by and written by M4 and M5
query: SELECT count(*) WHERE {
  ?x0 a ns:film.writer .
  ?x0 ns:film.writer.film M1 .
  ?x0 ns:film.writer.film M2 .
  M3 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
  M3 ns:film.film.written_by M4 .
  M3 ns:film.film.written_by M5 .
  M6 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
  M6 ns:film.film.written_by M4 .
  M6 ns:film.film.written_by M5
  }