act as a substitute for vs do something in someone's stead

act as a substitute for

do something in someone's stead

How often have the words act as a substitute for and do something in someone's stead occurred in a corpus of books? (source: Google Ngram Viewer )