Was a writer of M1 a Canadian person that M3 starred
SELECT count(*) WHERE {
?x0 a ns:people.person .
?x0 ns:film.actor.film/ns:film.performance.film M3 .
?x0 ns:film.writer.film M1 .
?x0 ns:people.person.nationality ns:m.0d060g
}