in pain vs on the rack

in pain

phrase
  • Feeling or experiencing pain. 

on the rack

How often have the words in pain and on the rack occurred in a corpus of books? (source: Google Ngram Viewer )