Were M2 , M4 , M5 , M6 , and M7 executive produced by M1 's male spouse and written by M3
SELECT count(*) WHERE {
?x0 ns:people.person.gender ns:m.05zppz .
?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 M1 .
FILTER ( ?x0 != M1 ) .
M2 ns:film.film.executive_produced_by ?x0 .
M2 ns:film.film.written_by M3 .
M4 ns:film.film.executive_produced_by ?x0 .
M4 ns:film.film.written_by M3 .
M5 ns:film.film.executive_produced_by ?x0 .
M5 ns:film.film.written_by M3 .
M6 ns:film.film.executive_produced_by ?x0 .
M6 ns:film.film.written_by M3 .
M7 ns:film.film.executive_produced_by ?x0 .
M7 ns:film.film.written_by M3
}