Did M3 star a costume designer that M1 was written by and M2 starred
SELECT count(*) WHERE {
?x0 a ns:film.film_costumer_designer .
?x0 ns:film.actor.film/ns:film.performance.film M2 .
?x0 ns:film.writer.film M1 .
M3 ns:film.film.starring/ns:film.performance.actor ?x0
}