Please answer a question about the following article about London:

Within London, both the City of London and the City of Westminster have city status and both the City of London and the remainder of Greater London are counties for the purposes of lieutenancies. The area of Greater London has incorporated areas that were once part of the historic counties of Middlesex, Kent, Surrey, Essex and Hertfordshire. London's status as the capital of England, and later the United Kingdom, has never been granted or confirmed officially—by statute or in written form.[note 6]

For what reason are the City of London and Greater London considered to be counties?
for the purposes of lieutenancies