Was M0 a Canadian screenwriter that M3 married and M4 married
SELECT count(*) WHERE {
FILTER ( M0 != M3 ) .
FILTER ( M0 != M4 ) .
M0 a ns:film.writer .
M0 ns:people.person.nationality ns:m.0d060g .
M0 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses M3 .
M0 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses M4
}