Were M2 and M5 produced by M3 , directed by a costume designer employed by M1 , and produced by M4
SELECT count(*) WHERE {
?x0 a ns:film.film_costumer_designer .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M1 .
M2 ns:film.film.directed_by ?x0 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M5 ns:film.film.directed_by ?x0 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M4
}