Were M3 and M5 edited by M4 and written by a film producer whose employer acquired M1 and M2
SELECT count(*) WHERE {
?x0 a ns:film.producer .
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company ?x1 .
?x1 ns:organization.organization.companies_acquired/ns:business.acquisition.company_acquired M1 .
?x1 ns:organization.organization.companies_acquired/ns:business.acquisition.company_acquired M2 .
M3 ns:film.film.edited_by M4 .
M3 ns:film.film.written_by ?x0 .
M5 ns:film.film.edited_by M4 .
M5 ns:film.film.written_by ?x0
}