Were M3 and M6 written by a person that wrote M1 and M2 and directed by M4 and M5
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.writer.film M1 .
?x0 ns:film.writer.film M2 .
M3 ns:film.film.directed_by M4 .
M3 ns:film.film.directed_by M5 .
M3 ns:film.film.written_by ?x0 .
M6 ns:film.film.directed_by M4 .
M6 ns:film.film.directed_by M5 .
M6 ns:film.film.written_by ?x0
}