Were M3 and M4 executive produced by M1 's costume designer , executive produced by a screenwriter , and written by M2 's executive producer
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x1 ns:film.film_costumer_designer.costume_design_for_film M1 .
?x2 ns:film.producer.films_executive_produced M2 .
M3 ns:film.film.executive_produced_by ?x0 .
M3 ns:film.film.executive_produced_by ?x1 .
M3 ns:film.film.written_by ?x2 .
M4 ns:film.film.executive_produced_by ?x0 .
M4 ns:film.film.executive_produced_by ?x1 .
M4 ns:film.film.written_by ?x2
}