Were M1 , M3 , and M4 written by a film 's producer 's employee and written by M2
SELECT count(*) WHERE {
?x0 ns:people.person.employment_history/ns:business.employment_tenure.company ?x1 .
?x1 ns:film.producer.film|ns:film.production_company.films ?x2 .
?x2 a ns:film.film .
M1 ns:film.film.written_by ?x0 .
M1 ns:film.film.written_by M2 .
M3 ns:film.film.written_by ?x0 .
M3 ns:film.film.written_by M2 .
M4 ns:film.film.written_by ?x0 .
M4 ns:film.film.written_by M2
}