Was a screenwriter employed by M1 and employed by a person 's spouse 's employer
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company ?x1 .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M1 .
?x1 ns:business.employer.employees/ns:business.employment_tenure.person ?x2 .
?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:people.person .
FILTER ( ?x2 != ?x3 )
}