Was M3 directed by a Japanese film director 's parent and written by M1 's Japanese spouse
SELECT count(*) WHERE {
?x0 ns:people.person.nationality ns:m.03_3d .
?x0 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses M1 .
?x1 ns:people.person.children|ns:fictional_universe.fictional_character.children|ns:organization.organization.child/ns:organization.organization_relationship.child ?x2 .
?x2 a ns:film.director .
?x2 ns:people.person.nationality ns:m.03_3d .
FILTER ( ?x0 != M1 ) .
M3 ns:film.film.directed_by ?x1 .
M3 ns:film.film.written_by ?x0
}