Was M3 influenced by a Spanish screenwriter , influenced by a actor , and influenced by a actor 's spouse
SELECT count(*) WHERE {
?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 ?x1 .
?x1 a ns:film.actor .
?x2 a ns:film.actor .
?x3 a ns:film.writer .
?x3 ns:people.person.nationality ns:m.06mkj .
FILTER ( ?x0 != ?x1 ) .
M3 ns:influence.influence_node.influenced_by ?x0 .
M3 ns:influence.influence_node.influenced_by ?x2 .
M3 ns:influence.influence_node.influenced_by ?x3
}