Was M2 distributed by a child of M0 's distributor and producer and produced by a costume designer
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.film_distributor.films_distributed/ns:film.film_film_distributor_relationship.film M0 .
?x1 ns:film.producer.film|ns:film.production_company.films M0 .
?x2 a ns:film.film_costumer_designer .
M2 ns:film.film.distributors/ns:film.film_film_distributor_relationship.distributor ?x0 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x2
}