<P> During the 19th century, Britain and the Russian Empire vied to fill the power vacuums that had been left by the declining Ottoman Empire, Qajar dynasty and Qing Dynasty . This rivalry in Central Asia came to be known as the "Great Game". As far as Britain was concerned, defeats inflicted by Russia on Persia and Turkey demonstrated its imperial ambitions and capabilities and stoked fears in Britain of an overland invasion of India . In 1839, Britain moved to pre-empt this by invading Afghanistan, but the First Anglo - Afghan War was a disaster for Britain . </P> <P> When Russia invaded the Turkish Balkans in 1853, fears of Russian dominance in the Mediterranean and Middle East led Britain and France to invade the Crimean Peninsula to destroy Russian naval capabilities . The ensuing Crimean War (1854--56), which involved new techniques of modern warfare, was the only global war fought between Britain and another imperial power during the Pax Britannica and was a resounding defeat for Russia . The situation remained unresolved in Central Asia for two more decades, with Britain annexing Baluchistan in 1876 and Russia annexing Kirghizia, Kazakhstan, and Turkmenistan . For a while it appeared that another war would be inevitable, but the two countries reached an agreement on their respective spheres of influence in the region in 1878 and on all outstanding matters in 1907 with the signing of the Anglo - Russian Entente . The destruction of the Russian Navy by the Japanese at the Battle of Port Arthur during the Russo - Japanese War of 1904--05 also limited its threat to the British . </P> <P> The Dutch East India Company had founded the Cape Colony on the southern tip of Africa in 1652 as a way station for its ships travelling to and from its colonies in the East Indies . Britain formally acquired the colony, and its large Afrikaner (or Boer) population in 1806, having occupied it in 1795 to prevent its falling into French hands during the Flanders Campaign . British immigration began to rise after 1820, and pushed thousands of Boers, resentful of British rule, northwards to found their own--mostly short - lived--independent republics, during the Great Trek of the late 1830s and early 1840s . In the process the Voortrekkers clashed repeatedly with the British, who had their own agenda with regard to colonial expansion in South Africa and to the various native African polities, including those of the Sotho and the Zulu nations . Eventually the Boers established two republics which had a longer lifespan: the South African Republic or Transvaal Republic (1852--77; 1881--1902) and the Orange Free State (1854--1902). In 1902 Britain occupied both republics, concluding a treaty with the two Boer Republics following the Second Boer War (1899--1902). </P> <P> In 1869 the Suez Canal opened under Napoleon III, linking the Mediterranean with the Indian Ocean . Initially the Canal was opposed by the British; but once opened, its strategic value was quickly recognised and became the "jugular vein of the Empire". In 1875, the Conservative government of Benjamin Disraeli bought the indebted Egyptian ruler Isma'il Pasha's 44% shareholding in the Suez Canal for £ 4 million (equivalent to £ 340 million in 2015). Although this did not grant outright control of the strategic waterway, it did give Britain leverage . Joint Anglo - French financial control over Egypt ended in outright British occupation in 1882 . The French were still majority shareholders and attempted to weaken the British position, but a compromise was reached with the 1888 Convention of Constantinople, which made the Canal officially neutral territory . </P>

How many countries were in the british empire at its peak