The numbers of deaths in the concentrations camps differ in quality for 'white' and 'black' internees.
For black and coloured:
What records there are show that 115,700 were interned, slightly more than half of those in Orange River Colony, as it was known at the time, and the rest in Transvaal. The records also show that 14,154 died, over 80 per cent of them children, but the true number has been estimated in the region of 20,000.
(Anon., Black Concentration Camps during the Anglo-Boer War (Bloemfontein, War Museum, 1996); Jackson, Tabitha, The Boer War (London, Macmillan, 1999); Warwick, Peter, Black People and the South African War 1899– 1902 (Cambridge, Cambridge University Press, 1983).)
The total of those who died in the camps was 27,927, of whom 26,251 were women and children. More than 22,000 of the dead were under sixteen years of age.
(Hall, Darrell, ed. Fransjohan Pretorius and Gilbert Torlage, The Hall Handbook of the Anglo-Boer War (Pietermaritzburg, University of Natal Press, 1999); Pakenham, Thomas, The Boer War (London, Weidenfeld & Nicolson, 1979; Abacus, 1992).)
Both quotes from Martin Marix Evans: "Encyclopedia of the Boer War", ABC-CLIO: Oxford, 2000.
This is consistent with the Wikipedia article on concentrations camps of the second Anglo-Boer-War:
The poor diet and inadequate hygiene led to contagious diseases such as measles, typhoid and dysentery. Coupled with a shortage of medical facilities, this led to large numbers of deaths—a report after the war concluded that 27,927 Boer (of whom 22,074 were children under 16) and 14,154 black Africans had died of starvation, disease and exposure in the camps. In all, about 25% of the Boer inmates and 12% of the black African ones died (although recent research suggests that the black African deaths were underestimated and may have actually been around 20,000).
Or in short form (rounding off numbers):
In all 115,000 were interned – around a sixth of the entire Boer population – and of those more than 28,000 died, around one-in-four, 22,000 of them children. Twenty thousand black Africans also died of around 80,000 who were interned.
Rees-Mogg's comparison with Glasgow at the time is misleading at best. The concentration camp figure of deaths spans a year, totalling more than 48,000 who perished, Boer and black, from a prisoner population of less than 200,000. Glasgow, in 1901, had a population of 762,000 and, according to the National Records of Scotland, 16,190 people died. That dropped slightly to 15,530 in 1902.
The usual measurement is of deaths per 100,000 population, and on that measurement camp deaths were an astronomical 24,000/100,000 – more than 10 times that of Glasgow at the time, at 2,124/100,000.
Ron McKay: "Is Rees-Mogg's claim that the death rate in Glasgow was the same as Boer War concentration camps true?", The Herald, 16 Feb 2019.
Further corroboration: In 1901 80.107 people died out of 4,472,103 in the whole of Scotland. (Deaths Time Series Data, Last Updated: 25 September 2018).
In other measures: Death rates for Glasgow in 1901:
Males: 22.49; Females: 20.05/1000
Carolyn I. Pennington: "Mortality and Medical Care in Nineteenth-Century Glasgow", Medical History, 1979, 23:442–450. (PDF)