Was M3 written by a Canadian cinematographer 's female spouse , edited by M5 , and executive produced by M4
SELECT count(*) WHERE {
?x0 ns:people.person.gender ns:m.02zsn .
?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 a ns:film.cinematographer .
?x1 ns:people.person.nationality ns:m.0d060g .
FILTER ( ?x0 != ?x1 ) .
M3 ns:film.film.edited_by M5 .
M3 ns:film.film.executive_produced_by M4 .
M3 ns:film.film.written_by ?x0
}