<P> Tensions between Britain and the United States escalated again during the Napoleonic Wars, as Britain tried to cut off American trade with France and boarded American ships to impress men into the Royal Navy . The US declared war, the War of 1812, and invaded Canadian territory . In response Britain invaded the US, but the pre-war boundaries were reaffirmed by the 1814 Treaty of Ghent, ensuring Canada's future would be separate from that of the United States . </P> <P> Since 1718, transportation to the American colonies had been a penalty for various offences in Britain, with approximately one thousand convicts transported per year across the Atlantic . Forced to find an alternative location after the loss of the Thirteen Colonies in 1783, the British government turned to the newly discovered lands of Australia . The coast of Australia had been discovered for Europeans by the Dutch explorer Willem Janszoon in 1606 and was named New Holland by the Dutch East India Company, but there was no attempt to colonise it . In 1770 James Cook discovered the eastern coast of Australia while on a scientific voyage to the South Pacific Ocean, claimed the continent for Britain, and named it New South Wales . In 1778, Joseph Banks, Cook's botanist on the voyage, presented evidence to the government on the suitability of Botany Bay for the establishment of a penal settlement, and in 1787 the first shipment of convicts set sail, arriving in 1788 . Britain continued to transport convicts to New South Wales until 1840, to Tasmania until 1853 and to Western Australia until 1868 . The Australian colonies became profitable exporters of wool and gold, mainly because of gold rushes in the colony of Victoria, making its capital Melbourne for a time the richest city in the world and the second largest city (after London) in the British Empire . </P> <P> During his voyage, Cook also visited New Zealand, first discovered by Dutch explorer Abel Tasman in 1642, and claimed the North and South islands for the British crown in 1769 and 1770 respectively . Initially, interaction between the indigenous Māori population and Europeans was limited to the trading of goods . European settlement increased through the early decades of the 19th century, with numerous trading stations established, especially in the North . In 1839, the New Zealand Company announced plans to buy large tracts of land and establish colonies in New Zealand . On 6 February 1840, Captain William Hobson and around 40 Maori chiefs signed the Treaty of Waitangi . This treaty is considered by many to be New Zealand's founding document, but differing interpretations of the Maori and English versions of the text have meant that it continues to be a source of dispute . </P> <P> Britain was challenged again by France under Napoleon, in a struggle that, unlike previous wars, represented a contest of ideologies between the two nations . It was not only Britain's position on the world stage that was at risk: Napoleon threatened to invade Britain itself, just as his armies had overrun many countries of continental Europe . </P>

How many countries were there in the british empire