Were M1 and M2 produced by and written by a spouse of M0 's executive producer and costume designer
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 ns:film.film_costumer_designer.costume_design_for_film M0 .
?x1 ns:film.producer.films_executive_produced M0 .
FILTER ( ?x0 != ?x1 ) .
M1 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M1 ns:film.film.written_by ?x0 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M2 ns:film.film.written_by ?x0
}