in rags vs on its last legs

in rags

prep
  • Very poor or lowly. 

  • Dressed in very old, torn clothes. 

on its last legs

How often have the words in rags and on its last legs occurred in a corpus of books? (source: Google Ngram Viewer )