Did a male person whose spouse was employed by M3 and M4 and was employed by M5 direct M2
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.director.film M2 .
?x0 ns:people.person.gender ns:m.05zppz .
?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:people.person.employment_history/ns:business.employment_tenure.company M3 .
?x1 ns:people.person.employment_history/ns:business.employment_tenure.company M4 .
?x1 ns:people.person.employment_history/ns:business.employment_tenure.company M5 .
FILTER ( ?x0 != ?x1 )
}