Was M3 influenced by a male spouse of a person and influenced by M2 's writer , star , and costume designer
SELECT count(*) WHERE {
?x0 ns:people.person.gender ns:m.05zppz .
?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:people.person .
?x2 ns:film.actor.film/ns:film.performance.film M2 .
?x2 ns:film.film_costumer_designer.costume_design_for_film M2 .
?x2 ns:film.writer.film M2 .
FILTER ( ?x0 != ?x1 ) .
M3 ns:influence.influence_node.influenced_by ?x0 .
M3 ns:influence.influence_node.influenced_by ?x2
}