Were M2 , M4 , and M5 written by a costume designer that a prequel of M1 was directed by and produced by M3
SELECT count(*) WHERE {
?x0 a ns:film.film_costumer_designer .
?x0 ns:film.director.film ?x1 .
?x1 ns:film.film.sequel M1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M2 ns:film.film.written_by ?x0 .
M4 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M4 ns:film.film.written_by ?x0 .
M5 ns:film.film.produced_by|ns:film.film.production_companies M3 .
M5 ns:film.film.written_by ?x0
}