Was M2 directed by M1 's costume designer , written by M0 's child , and written by M3
SELECT count(*) WHERE {
?x0 ns:people.person.parents|ns:fictional_universe.fictional_character.parents|ns:organization.organization.parent/ns:organization.organization_relationship.parent M0 .
?x1 ns:film.film_costumer_designer.costume_design_for_film M1 .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.written_by ?x0 .
M2 ns:film.film.written_by M3
}