Was M3 produced by M2 's director and written by a Spanish art director of M1
SELECT count(*) WHERE {
?x0 ns:film.film_art_director.films_art_directed M1 .
?x0 ns:people.person.nationality ns:m.06mkj .
?x1 ns:film.director.film M2 .
M3 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
M3 ns:film.film.written_by ?x0
}