formerly vs once upon a time

formerly

adv
  • at some time in the past 

  • previously; once 

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 formerly and once upon a time occurred in a corpus of books? (source: Google Ngram Viewer )