Were M3 and M6 executive produced by M4 and M5 and written by a Japanese film producer employed by M1
SELECT count(*) WHERE {
?x0 a ns:film.producer .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M1 .
?x0 ns:people.person.nationality ns:m.03_3d .
M3 ns:film.film.executive_produced_by M4 .
M3 ns:film.film.executive_produced_by M5 .
M3 ns:film.film.written_by ?x0 .
M6 ns:film.film.executive_produced_by M4 .
M6 ns:film.film.executive_produced_by M5 .
M6 ns:film.film.written_by ?x0
}