Were M2 and M5 produced by M0 's art director , directed by M1 's spouse , and produced by M3 and M4
SELECT count(*) WHERE {
?x0 ns:film.film_art_director.films_art_directed M0 .
?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 .
FILTER ( ?x1 != M1 ) .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M5 ns:film.film.directed_by ?x1 .
M5 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M4
}