Did a parent of M1 write a sequel of M2 and write M0
SELECT count(*) WHERE {
?x0 ns:film.writer.film ?x1 .
?x0 ns:film.writer.film M0 .
?x0 ns:people.person.children|ns:fictional_universe.fictional_character.children|ns:organization.organization.child/ns:organization.organization_relationship.child M1 .
?x1 ns:film.film.prequel M2
}