Was M3 written by a cinematographer employed by M1 and M2 and edited by M4 and M5
SELECT count(*) WHERE {
?x0 a ns:film.cinematographer .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M1 .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company M2 .
M3 ns:film.film.edited_by M4 .
M3 ns:film.film.edited_by M5 .
M3 ns:film.film.written_by ?x0
}