Did a writer of M0 influence M1 and M2 and influence M3 's prequel 's director
SELECT count(*) WHERE {
?x0 ns:film.writer.film M0 .
?x0 ns:influence.influence_node.influenced ?x1 .
?x0 ns:influence.influence_node.influenced M1 .
?x0 ns:influence.influence_node.influenced M2 .
?x1 ns:film.director.film ?x2 .
?x2 ns:film.film.sequel M3
}