Were M2 and M5 directed by M3 and M4 and written by a male parent of M1
SELECT count(*) WHERE {
?x0 ns:people.person.children|ns:fictional_universe.fictional_character.children|ns:organization.organization.child/ns:organization.organization_relationship.child M1 .
?x0 ns:people.person.gender ns:m.05zppz .
M2 ns:film.film.directed_by M3 .
M2 ns:film.film.directed_by M4 .
M2 ns:film.film.written_by ?x0 .
M5 ns:film.film.directed_by M3 .
M5 ns:film.film.directed_by M4 .
M5 ns:film.film.written_by ?x0
}