Were M2 and M3 written by and produced by a male employee of a film producer
SELECT count(*) WHERE {
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company ?x1 .
?x0 ns:people.person.gender ns:m.05zppz .
?x1 a ns:film.producer .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M2 ns:film.film.written_by ?x0 .
M3 ns:film.film.produced_by|ns:film.film.production_companies ?x0 .
M3 ns:film.film.written_by ?x0
}