question: Was M0 a Canadian actor that M2 was produced by , starred , and was written by
query: SELECT count(*) WHERE {
  M0 a ns:film.actor .
  M0 ns:film.actor.film/ns:film.performance.film M2 .
  M0 ns:film.producer.film|ns:film.production_company.films M2 .
  M0 ns:film.writer.film M2 .
  M0 ns:people.person.nationality ns:m.0d060g
  }