Were M4 and M5 written and edited by a male Spanish film director that M2 starred
SELECT count(*) WHERE {
?x0 a ns:film.director .
?x0 ns:film.actor.film/ns:film.performance.film M2 .
?x0 ns:people.person.gender ns:m.05zppz .
?x0 ns:people.person.nationality ns:m.06mkj .
M4 ns:film.film.edited_by ?x0 .
M4 ns:film.film.written_by ?x0 .
M5 ns:film.film.edited_by ?x0 .
M5 ns:film.film.written_by ?x0
}