Was M2 produced by M4 , written by M3 , and written by a employee of M0 and M1
SELECT count(*) WHERE {
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M0 .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M1 .
M2 ns:film.film.produced_by|ns:film.film.production_companies M4 .
M2 ns:film.film.written_by ?x0 .
M2 ns:film.film.written_by M3
}