Was M0 's sequel 's prequel 's prequel produced by M1 's spouse
SELECT count(*) WHERE {
?x0 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
?x0 ns:film.film.sequel ?x2 .
?x1 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 .
?x2 ns:film.film.sequel ?x3 .
?x3 ns:film.film.prequel M0 .
FILTER ( ?x1 != M1 )
}