Legions and armies are two different things. Legions typically had between 5000 and 6000 fighting men. Armies were two or more Legions. Legions were the Roman equivalent of Divisions. They made of 10 Cohorts each of 500 to 600 men, similar to todays Battalions
This is true, but we should remember that legions did not fight alone. Allies and Auxiliaries considerably enhanced the size of Roman armies. Legions formed the core of the forces, and were meant to be the elite, but the other troops in Roman armies could outnumber them.
We should also note that for the greater part of our time period, between 300 BC - 100 BC , the Romans employed the Polybian Legions, which were usually 4,500 men strong (although larger legions could be raised at times). These 4,500 were comprised of 1,200 light Velites, 300 Equites horse, and 3000 Heavy Infantry divided into maniples rather than cohorts. Maniples were made up of 120 men if Principes or Hastati and 60 men if Triari (10 Maniples of Principes, 10 Maniples of Hastati, 10 Maniples of Triari) for a total of 30 Maniples in each legion.
A standard Consular army would contain two Roman legions and two allied Alae formed from The Italian Socii/allies. The alae were apparently roughly modelled on the legion, but were larger than the Roman legion, with far more cavalry, at 5,400 men. In a standard deployment the Alae (literally "wings") formed up on the flanks of the Roman legions , who usually deployed in the middle, side by side. A picked selection from the alae - cavalry and infantry - would form the Extraordinarii, under the direct command of the Consul. It is noteworthy that with this deployment, a standard Consular army was about 20,000 men - around 16,800 infantry (Of which 12,000 were heavy infantry) and 3,000 cavalry (mostly from the alae)*. With two Consuls, this gave Mid Republican Rome a potential fieldable Consular Army strength of 40,000 men, but in times of crisis - such as in the Punic Wars - this could be doubled to 80,000.
*Note the high strengths of light infantry and cavalry - in a force of 20,000; 4,800 light infantry Velites (or Socii equivalent) and 3000 cavalry! The Legionaries were the famous glory boys - but the cavalry and light infantry together formed a third of the army.