Were M3 and M5 written by a Japanese film director , produced by M4 , and edited by M2 's executive producer
SELECT count(*) WHERE {
?x0 a ns:film.director .
?x0 ns:people.person.nationality ns:m.03_3d .
?x1 ns:film.producer.films_executive_produced M2 .
M3 ns:film.film.edited_by ?x1 .
M3 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M3 ns:film.film.written_by ?x0 .
M5 ns:film.film.edited_by ?x1 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M5 ns:film.film.written_by ?x0
}