Was M3 produced by a Spanish film producer 's child , executive produced by M0 's parent , and written by M4
SELECT count(*) WHERE {
?x0 ns:people.person.children|ns:fictional_universe.fictional_character.children|ns:organization.organization.child/ns:organization.organization_relationship.child M0 .
?x1 ns:people.person.parents|ns:fictional_universe.fictional_character.parents|ns:organization.organization.parent/ns:organization.organization_relationship.parent ?x2 .
?x2 a ns:film.producer .
?x2 ns:people.person.nationality ns:m.06mkj .
M3 ns:film.film.executive_produced_by ?x0 .
M3 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
M3 ns:film.film.written_by M4
}