Were M3 and M5 written by a female American writer of M0 and written by M4
SELECT count(*) WHERE {
?x0 ns:film.writer.film M0 .
?x0 ns:people.person.gender ns:m.02zsn .
?x0 ns:people.person.nationality ns:m.09c7w0 .
M3 ns:film.film.written_by ?x0 .
M3 ns:film.film.written_by M4 .
M5 ns:film.film.written_by ?x0 .
M5 ns:film.film.written_by M4
}