Did M1 star a screenwriter 's actor , star M2 , and star a screenwriter
SELECT count(*) WHERE {
?x0 a ns:film.writer .
?x1 ns:film.actor.film/ns:film.performance.character ?x2 .
?x2 a ns:film.writer .
M1 ns:film.film.starring/ns:film.performance.actor ?x0 .
M1 ns:film.film.starring/ns:film.performance.actor ?x1 .
M1 ns:film.film.starring/ns:film.performance.actor M2
}