Was a film edited by and written by a costume designer that M2 was produced by
SELECT count(*) WHERE {
?x0 a ns:film.film .
?x0 ns:film.film.edited_by ?x1 .
?x0 ns:film.film.written_by ?x1 .
?x1 a ns:film.film_costumer_designer .
?x1 ns:film.producer.film|ns:film.production_company.films M2
}