Was M2 written by M3 and M4 and directed by a person whose spouse influenced M1
SELECT count(*) WHERE {
?x0 a ns:people.person .
?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 ns:influence.influence_node.influenced M1 .
FILTER ( ?x0 != ?x1 ) .
M2 ns:film.film.directed_by ?x0 .
M2 ns:film.film.written_by M3 .
M2 ns:film.film.written_by M4
}