Were M1 and M5 written by M2 and M3 , written by a star of M0 , and written by M4
SELECT count(*) WHERE {
?x0 ns:film.actor.film/ns:film.performance.film M0 .
M1 ns:film.film.written_by ?x0 .
M1 ns:film.film.written_by M2 .
M1 ns:film.film.written_by M3 .
M1 ns:film.film.written_by M4 .
M5 ns:film.film.written_by ?x0 .
M5 ns:film.film.written_by M2 .
M5 ns:film.film.written_by M3 .
M5 ns:film.film.written_by M4
}