Were M5 , M6 , and M7 directed and written by a male person that M1 , M2 , and M3 influenced
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:influence.influence_node.influenced_by M1 .
?x0 ns:influence.influence_node.influenced_by M2 .
?x0 ns:influence.influence_node.influenced_by M3 .
?x0 ns:people.person.gender ns:m.05zppz .
M5 ns:film.film.directed_by ?x0 .
M5 ns:film.film.written_by ?x0 .
M6 ns:film.film.directed_by ?x0 .
M6 ns:film.film.written_by ?x0 .
M7 ns:film.film.directed_by ?x0 .
M7 ns:film.film.written_by ?x0
}