Were M1 , M3 , and M4 edited by M2 and written by a film 's producer 's child
SELECT count(*) WHERE {
?x0 ns:people.person.parents|ns:fictional_universe.fictional_character.parents|ns:organization.organization.parent/ns:organization.organization_relationship.parent ?x1 .
?x1 ns:film.producer.film|ns:film.production_company.films ?x2 .
?x2 a ns:film.film .
M1 ns:film.film.edited_by M2 .
M1 ns:film.film.written_by ?x0 .
M3 ns:film.film.edited_by M2 .
M3 ns:film.film.written_by ?x0 .
M4 ns:film.film.edited_by M2 .
M4 ns:film.film.written_by ?x0
}