earlier vs once upon a time

earlier

adv
  • previously; before now; sooner 

adj
  • occurring previously 

once upon a time

adv
  • A long time ago; at some time in the past (a traditional beginning of children's stories, especially fairy tales). 

How often have the words earlier and once upon a time occurred in a corpus of books? (source: Google Ngram Viewer )