Were M2 and M5 written by M0 's cinematographer , produced by M3 and M4 , and directed by a costume designer
SELECT count(*) WHERE {
?x0 ns:film.cinematographer.film M0 .
?x1 a ns:film.film_costumer_designer .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M2 ns:film.film.written_by ?x0 .
M5 ns:film.film.directed_by ?x1 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M5 ns:film.film.written_by ?x0
}