Did a director and writer of M0 marry M1 's producer , editor , and art director and marry M2 's employee
SELECT count(*) WHERE {
?x0 ns:film.director.film M0 .
?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 ?x1 .
?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 ?x2 .
?x1 ns:film.editor.film M1 .
?x1 ns:film.film_art_director.films_art_directed M1 .
?x1 ns:film.producer.film|ns:film.production_company.films M1 .
?x2 ns:people.person.employment_history/ns:business.employment_tenure.company M2 .
FILTER ( ?x0 != ?x1 ) .
FILTER ( ?x0 != ?x2 )
}