The Total War series consists of many games over the past 20 years or more, and some are more or less realistic, detailed, and literal than others, and the answer may be different from game to game. I’ve only played a few of them, but…
In general I think they mean to have one soldier represent one soldier from a tactical point of view, but they are not attempting to accurately reflect historical army sizes in various situations. In general they’re probably a bit low in the numbers compared to history, but the games cover a lot of history.
In Rome:Total War, I remember that some of the legions in the game were based on ¼ of their historical sizes.
But the Total War games, particularly in campaign mode rather than a one-shot historical battle-only scenario, I have seen all overlay their own abstract notions of what a “unit” is, and how many can be in a “stack”, which are just based on relatively abstract game design ideas. It’s not trying to be particularly historical for the actual numbers of men, particularly compared to some of the larger battles in history.