Were M2 and M3 edited by a actor 's spouse and written by a film 's executive producer
SELECT count(*) WHERE {
?x0 ns:film.producer.films_executive_produced ?x1 .
?x1 a ns:film.film .
?x2 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses ?x3 .
?x3 a ns:film.actor .
FILTER ( ?x2 != ?x3 ) .
M2 ns:film.film.edited_by ?x2 .
M2 ns:film.film.written_by ?x0 .
M3 ns:film.film.edited_by ?x2 .
M3 ns:film.film.written_by ?x0
}