Did a person whose employer employed M2 write M1
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.writer.film M1 .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company ?x1 .
?x1 ns:business.employer.employees/ns:business.employment_tenure.person M2
}