Was M2 directed by a writer of M1 , produced by a costume designer , and directed by M3
SELECT count(*) WHERE {
?x0 a ns:film.film_costumer_designer .
?x1 ns:film.writer.film M1 .
M2 ns:film.film.directed_by ?x1 .
M2 ns:film.film.directed_by M3 .
M2 ns:film.film.produced_by|ns:film.film.production_companies ?x0
}