Were M1 and M5 influenced by M2 , influenced by a director of M0 's prequel , and influenced by M3 and M4
SELECT count(*) WHERE {
?x0 ns:film.director.film ?x1 .
?x1 ns:film.film.sequel M0 .
M1 ns:influence.influence_node.influenced_by ?x0 .
M1 ns:influence.influence_node.influenced_by M2 .
M1 ns:influence.influence_node.influenced_by M3 .
M1 ns:influence.influence_node.influenced_by M4 .
M5 ns:influence.influence_node.influenced_by ?x0 .
M5 ns:influence.influence_node.influenced_by M2 .
M5 ns:influence.influence_node.influenced_by M3 .
M5 ns:influence.influence_node.influenced_by M4
}