Was M2 produced by M0 's executive producer 's spouse , written by M3 , and edited by M1 's director
SELECT count(*) WHERE {
?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:film.producer.films_executive_produced M0 .
?x2 ns:film.director.film M1 .
FILTER ( ?x0 != ?x1 ) .
M2 ns:film.film.edited_by ?x2 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M2 ns:film.film.written_by M3
}