Were M2 , M4 , and M5 influenced by a film 's writer , influenced by M3 , and influenced by a person
SELECT count(*) WHERE {
?x0 ns:film.writer.film ?x1 .
?x1 a ns:film.film .
?x2 a ns:people.person .
M2 ns:influence.influence_node.influenced_by ?x0 .
M2 ns:influence.influence_node.influenced_by ?x2 .
M2 ns:influence.influence_node.influenced_by M3 .
M4 ns:influence.influence_node.influenced_by ?x0 .
M4 ns:influence.influence_node.influenced_by ?x2 .
M4 ns:influence.influence_node.influenced_by M3 .
M5 ns:influence.influence_node.influenced_by ?x0 .
M5 ns:influence.influence_node.influenced_by ?x2 .
M5 ns:influence.influence_node.influenced_by M3
}