Was M2 edited by a costume designer , written by M0 's costume designer , and written by M3
SELECT count(*) WHERE {
?x0 ns:film.film_costumer_designer.costume_design_for_film M0 .
?x1 a ns:film.film_costumer_designer .
M2 ns:film.film.edited_by ?x1 .
M2 ns:film.film.written_by ?x0 .
M2 ns:film.film.written_by M3
}