Was a film whose male executive producer married M2 written and edited by M3 's writer
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x0 ns:film.film.edited_by ?x1 .
?x0 ns:film.film.executive_produced_by ?x2 .
?x0 ns:film.film.written_by ?x1 .
?x1 ns:film.writer.film M3 .
?x2 ns:people.person.gender ns:m.05zppz .
?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 M2 .
FILTER ( ?x2 != M2 )
}