Was a screenwriter that M4 married and a director of M0 and M1 married M2
SELECT count(*) WHERE {
?x0 ns:film.director.film M0 .
?x0 ns:film.director.film M1 .
FILTER ( M2 != ?x0 ) .
FILTER ( M2 != M4 ) .
M2 a ns:film.writer .
M2 ns:people.person.spouse_s/ns:people.marriage.spouse|ns:fictional_universe.fictional_character.married_to/ns:fictional_universe.marriage_of_fictional_characters.spouses ?x0 .
M2 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
}