Garrison of Minas Tirith and its immediate defenses
Minas Tirith (3000-5000): The city had several standing units stationed in the city. At least three companies of the Guards of the Citadel were present. The smallest unit this force could be organized into is a battalion, which would require a few more companies. This makes sense because the Guards actually resemble a military order as opposed to an assortment of warriors. During WWI (an era Tolkien had a firsthand experience with), a company typically has around 200 to 500 soldiers. This means there may have been a thousand-plus Guards that were either active or off-duty at any given time.
Since the Guards were assigned to protect the upper levels of Minas Tirith, it has to be assumed that Minas Tirith maintained a rotation of troops to defend the rest of the city. With the basis that there are more regular soldiers than elite guards, the more populated levels of Minas Tirith would have had several thousand troops stationed there.
Lastly, the Sixth Level of the city housed a small force of riders. This group could have been messengers above anything else.
Ithilien (300): The Rangers of the South patrolled Ithilien and harassed enemy troops traversing through the forest in secrecy. Faramir referred to his group as a company. The surviving Rangers from skirmish against the Haradrim numbered ‘two or three hundred strong’ before they were sent to reinforce Gondor’s defenses. Given large expanse of Ithilien, there should have been several albeit smaller units under this service.
Osgiliath (1000-2500): Essential to the outer defenses of Minas Tirith, Osgiliath and its garrison was most likely a detachment from Minas Tirith than a separate entity. When Faramir sent his Rangers here, Denethor dismissed it as too few. The soldiers stationed at Osgiliath should then consist of enough men that the reinforcement of Faramir’s company was considered less than significant, but smaller than the main force stationed at Minas Tirith. They would have numbered somewhere between five to fifteen companies.
Cair Andros (500): This island defended a second practical passage across the Anduin River. It was a permanent garrison, but it was not sufficient enough as it was quickly overwhelmed by a host of Orcs and Easterlings. Imrahil warned Denethor that the enemy host was approaching Cair Andros, but Denethor risked not to reinforce it and simply left it at, ‘Cair Andros is manned and no more can be sent so far.’ Nothing more than a few hundred men should be stationed here.
Rammas Echor and Causeway Forts (100-500): The wall around Pelennor was the last line of defense before a direct assault on Minas Tirith could be made. It was manned by groups of soldiers throughout various entrances and gates of the wall. At the same time, repairs were underway, which would require more men stationed at the Rammas Echor. Because the entire length of the wall was not battle ready, its soldiers should number less than the ones at Osgiliath. Several companies would have then been used in both manning the battlements and repairing the walls (although the Causeway Forts were later reinforced by the survivors from Osgiliath).
The Fiefdoms of Gondor
Fiefdom Warriors that arrived at Minas Tirith (2700): As described in the book, a little less than three thousand men from various fiefdoms of Gondor marched to Minas Tirith in its defense. From the dialogue between the citizens of the city, much more were expected to arrive, which gives us some ground to quantify the troop strength of the fiefdoms that remained to defend inland Gondor.
Dol Amroth & Belfalas (1000-2000): Imrahil arrived with a company of mounted knights and seven hundred men-at-arms to the aid of Minas Tirith. Dol Amroth was seemingly autonomous and had its own standing military that was independent of Minas Tirith, but still loyal to the capital. A sizable force would have remained here to address the Umbar threat, but no more than the regular garrison at Minas Tirith as Dol Amroth is a smaller city.
Lamedon (2000-2500): Only a few, grim, leaderless hillmen came to Minas Tirith. This should not be an indicator of Lamedon’s strength as their lord, Angbor, led the fight against the Corsairs throughout Gondor. He would have rallied many of his men by the time he met Aragorn. After the liberation of Pelargir, Angbor was ordered to march to Minas Tirith with four thousand men while Aragorn sailed up the river. It would be logical that a good amount of this force were from his own lands of Lamedon, but not all since Angbor likely picked up warriors from throughout Lebennin as well.
Lossarnach (2000-2500): A heavily populated region of Gondor, Lossarnach only sent two hundred men to Minas Tirith when ten times of this were expected. This only speaks for what the citizens of Minas Tirith had hoped for, but if they were considerate that Lossarnach would have retained some men for defense in addition to the hypothetical two thousand men, then Lossarnach’s forces could have numbered at two thousand plus several more companies worth.
Lebennin (2000): This region did not send many troops, but it was described as a densely populated region. They should have had several thousands of men defending their many rivers and chief city in Pelargir. When Aragorn hastened to fill the ships of Umbar with troops, it is possible that men that were not soldiers would have been called to fight as well, but those men would be tallied later in Aragorn’s Forces at Pelargir.
Smaller Regions, Rivers and Fiefdoms (2500-3000): The remainders of Gondor’s forces were lead by lords of smaller regions and vales. Assuming that the men sent to Minas Tirith from Morthond, Pinnath Gelin, Ringlo Vale, etc were a faction of their overall power (around 1400 came from these lands), perhaps twice of that remained in their respective lands to address the Corsair threat. As for smaller towns and settlements like Calembel and Linhir, their lords could have had a company of household men as regulars and guardsmen. No more than a few hundred should account for this scattered throughout the towns of Gondor. Many of these men would have joined Angbor or been later rallied at Pelagir.
Aragorn’s Forces at Pelargir
The Black Ships: To give an idea of how much men Aragorn mustered at Pelargir, we should identify the fleet they captured. Gimli described the fleet as ‘fifty great ships and smaller vessels beyond count.’ An ocean capable ship that relied on both wind and man power would make the ‘great ships’ comparable to the Galley. Galleys had multiple decks for oarsmen and sported several masts. One particular type of ship that Tolkien mentioned is the dromund, which seems to be derived from the real world dromon, a galley-type warship. The smaller vessels could have then consisted of ram-ships, troop transports and non-ocean faring longships. A ship similar to the Viking Skei could have fulfilled the role of troop transports as they were smaller than Galleys, had a single deck of rowers, and sported a single mast that made them ocean capable and independent in operation. Longships like the Snekkja, although incapable of traveling in open sea, could have been towed by the larger ships until they were in traversable rivers. Since they were upon the Anduin River, it was possible that many of the smaller ships were Snekkja-types as they were best used in rivers and coastal landings.
There were fifty great ships at Pelargir, so the guesswork lies in how many ships ‘beyond count’ is. Since longships couldn’t travel from Umbar to Pelargir conveniently, they could have been towed by the fifty great ships (deducing that there were 50 or less Snekkja-types). As for the troop transports and ram-ships, a random but conservative guess numbers them between forty to fifty.
A typical Galley had an operating crew of 70 sailors and 120-plus oarsmen. Transports like the Skei-types could house a rowing crew of 70 to 80. Snekkja-type longships were smaller and only had a crew of 40 rowers. Since the oarsmen of Skeis and Snekkjas were considered the soldiers themselves (there was no room for anyone but oarsmen), it was unlikely that a transport/longship crew were slaves since they would have been armed. This would make the crew from the smaller ships exclusively from Umbar and Harad while the slaves of Gondor were shackled on the larger ships.
With an estimate on how large the fleet is and their crew capacity, Aragorn and Angbor must have rallied around 14000 men to completely fill the ships and have a surplus of 4000 men to travel on foot, totaling 18000 in all.
Enslaved Men of Gondor (6000): Most of the great ships utilized Gondor slaves as oarsmen. Given that there were fifty great ships and assuming that most of the rowing crew were slaves, there must have been some six thousand oarsmen that were later freed by Aragorn. It is plausible that the Black Fleet originally sailed out with original crews from Umbar and Harad, but as they enslaved more men into service, the fleet would have then used their surplus of idle sailors to occupy the towed longships.
The Rallied Fiefdoms (2000): If we added all the fiefdom warriors that did not go to Minas Tirith as described in The Fiefdoms of Gondor section, we hit around 12000-13000. Accounting for casualties and those that stayed behind, around 10000 men would have been rallied by Aragorn or were a part of Angbor’s forces. Additionally, Aragorn could have rallied the ordinary local population as well, bolstering Aragorn’s men by a thousand or two. Since we have already counted the 13000 fiefdom warriors, we will only include those that only took arms after the liberation of Pelargir (2000 would fulfill the requirements of 18000 men).
Notes: This force of 18000 did not all arrive at once. It was noted that after the Battle of Pelennor Fields, smaller ships were still coming up the Anduin. Additionally, Angbor was sent to march to Minas Tirith with 4000 men, well knowing they would arrive late. The only possible explanation was that they ran out of ships to ferry these men. Also, it was not known if the 6000 oarsmen fought in battle as well.
When their ships arrived, the Rohirrim were surrounded on Pelennor and sorties from Minas Tirith were unable to break through the wedge between them and the Rohirrim. Therefore, against such a great enemy in the combined forces of Mordor and Evil Men, Aragorn’s forces must have been rather large themselves to overturn and win the battle.
The Host of the West and Minas Tirith Refortified
Gondor’s contributions to this host came from soldiers that were already at hand after Pelennor. The host amounted to around six thousand infantry and one thousand riders (500 riders and 500 men belonged to Rohan). That would mean Gondor contributed to six thousand soldiers and knights in this host. However, it was stated that after this host departed for the Black Gates, Minas Tirith had more men defending it prior to the Siege of Minas Tirth.
Taking in accounts of the heavy casualties Gondor suffered in Osgiliath and Rammas Echor and the arrival of nearly three thousand fiefdom soldiers, the defense of Minas Tirith would have been around 7500 strong prior to the siege. To fulfill the requirement that Minas Tirith would have had more defenders after the Host of the West left for the Black Gates, there should have been at least 4500 Men of Gondor in addition to the 3000 surviving Rohirrim that remained behind. With approximately 15500 Men of Gondor at Pelennor Fields (7500 at Minas Tirith, 8000 led by Aragorn) as well as 6000 oarsmen at Harlond and 4000 foot soldiers that arrived late, it is possible that even after sustaining casualties, Aragorn could have departed with 6000 men and left 4500+ men at Minas Tirith.
The defenders of Minas Tirith did not suffer many casualties as Mordor caused mostly structural damage during the siege. Most of the siege towers were brought down before they reached the walls. Most of their casualties would have taken place when they sent forces outside the city to relieve the Rohirrim in direct combat. Aragorn’s men however, were in open field and fought until the end of the day. This would mean they should have suffered much more than the men of Minas Tirith (the Rohirrim by comparison lost 1/3 of their men in open field combat). Taking casualties in account, the survivors of Minas Tirith would have been around 5200 while 4800 survived under Aragorn’s command. They were later joined by an additional 4000 men that did not engage in battle. If we added these numbers and subtract the 6000 that went to the Black Gates, there would have been 8000 soldiers left behind, exceeding the 4500+ requirement. Elfhelm's riders of 3000 and the potential of the 6000 oarsmen would further make it true that Minas Tirith was more fortified than before the siege.
Minas Tirith and her outer defenses would have had a height of around 8000 soldiers. A little less than 3000 men from the fiefdoms came and reinforced Minas Tirith, but the fiefdoms themselves left behind forces around 15000 warriors. After the liberation of Pelargir, 6000 oarsmen would come under the command of Aragorn and further bolster Gondor. This would mean that Gondor had 23000 soldiers for war and an additional 6000 in the support capacity.
[Edited by Arwen: Changed formatting, which makes it clearer to read + Added source]
[Hope you don't mind!]