Was M2 influenced by a film producer that M1 was executive produced by and written by
SELECT count(*) WHERE {
?x0 a ns:film.producer .
?x0 ns:film.producer.films_executive_produced M1 .
?x0 ns:film.writer.film M1 .
M2 ns:influence.influence_node.influenced_by ?x0
}