Were M4 and M5 produced by a costume designer that M1 influenced , M2 married , and M3 married
SELECT count(*) WHERE {
?x0 a ns:film.film_costumer_designer .
?x0 ns:influence.influence_node.influenced_by M1 .
?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 M2 .
?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 M3 .
FILTER ( ?x0 != M2 ) .
FILTER ( ?x0 != M3 ) .
M4 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M5 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}