cock/lift its leg vs shake hands with an old friend

cock/lift its leg

shake hands with an old friend

How often have the words cock/lift its leg and shake hands with an old friend occurred in a corpus of books? (source: Google Ngram Viewer )