Were M3 and M4 written by a Spanish film director and edited by M2 's director and producer
SELECT count(*) WHERE {
?x0 a ns:film.director .
?x0 ns:people.person.nationality ns:m.06mkj .
?x1 ns:film.director.film M2 .
?x1 ns:film.producer.film|ns:film.production_company.films M2 .
M3 ns:film.film.edited_by ?x1 .
M3 ns:film.film.written_by ?x0 .
M4 ns:film.film.edited_by ?x1 .
M4 ns:film.film.written_by ?x0
}