contemplate vs rack one’s brains

contemplate

verb
  • To look at on all sides or in all its aspects; to view or consider with continued attention; to regard with deliberate care; to meditate on; to study, ponder, or consider. 

  • To consider as a possibility. 

rack one’s brains

How often have the words contemplate and rack one’s brains occurred in a corpus of books? (source: Google Ngram Viewer )