Lippe-Schaumburg, Friedrich Wilhelm Ernst von der, Count, British Commander-in-chief in Portugal