Did M1 's prequel 's Spanish writer direct M2 's prequel
SELECT count(*) WHERE {
?x0 ns:film.director.film ?x1 .
?x0 ns:film.writer.film ?x2 .
?x0 ns:people.person.nationality ns:m.06mkj .
?x1 ns:film.film.sequel M2 .
?x2 ns:film.film.sequel M1
}