Did a film whose art director married M2 star M1
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x0 ns:film.film.film_art_direction_by ?x1 .
?x0 ns:film.film.starring/ns:film.performance.actor M1 .
?x1 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 .
FILTER ( ?x1 != M2 )
}