Was M1 directed by M4 , written by M2 , directed by a person 's spouse , and written by 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 ?x1 .
?x1 a ns:people.person .
FILTER ( ?x0 != ?x1 ) .
M1 ns:film.film.directed_by ?x0 .
M1 ns:film.film.directed_by M4 .
M1 ns:film.film.written_by M2 .
M1 ns:film.film.written_by M3
}