Did M2 's spouse write M0 , executive produce M1 , and executive produce M3 's prequel
SELECT count(*) WHERE {
?x0 ns:film.producer.films_executive_produced ?x1 .
?x0 ns:film.producer.films_executive_produced M1 .
?x0 ns:film.writer.film 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 M2 .
?x1 ns:film.film.sequel M3 .
FILTER ( ?x0 != M2 )
}