Was a film whose star and writer married M0 and M1 and married M2 M3
SELECT count(*) WHERE {
?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 M0 .
?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 M1 .
?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 M2 .
FILTER ( ?x0 != M0 ) .
FILTER ( ?x0 != M1 ) .
FILTER ( ?x0 != M2 ) .
M3 a ns:film.film .
M3 ns:film.film.starring/ns:film.performance.actor ?x0 .
M3 ns:film.film.written_by ?x0
}