Did a screenwriter that influenced and was influenced by M1 produce and direct M2
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x0 ns:film.director.film M2 .
?x0 ns:film.producer.film|ns:film.production_company.films M2 .
?x0 ns:influence.influence_node.influenced M1 .
?x0 ns:influence.influence_node.influenced_by M1
}