Was M3 produced by a film distributor and written by a Spanish film editor
SELECT count(*) WHERE {
?x0 a ns:film.editor .
?x0 ns:people.person.nationality ns:m.06mkj .
?x1 a ns:film.film_distributor .
M3 ns:film.film.produced_by|ns:film.film.production_companies ?x1 .
M3 ns:film.film.written_by ?x0
}