Did M3 star a screenwriter and star a female director of M2
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x1 ns:film.director.film M2 .
?x1 ns:people.person.gender ns:m.02zsn .
M3 ns:film.film.starring/ns:film.performance.actor ?x0 .
M3 ns:film.film.starring/ns:film.performance.actor ?x1
}