First off, combat is calculated with the equivalent of percentage dice. Each attack factor in your front line has a certain chance to score a rout, and a certain chance to score a hit. The circled attack factors get a fixed bonus of 20 percent. Leadership bonuses vary depending on the differential between leaders but can add as much as another 20 percent. The total bonuses are added to the "die roll" for each attack factor. Bonuses increase the chance of scoring hits, not routs.
All of those "die rolls" added together to determine the number of hits and routs which were scored. So yes, a hit or a rout is scored on a specific number. For example, in a Pitched Battle each attack factor has a 10% chance of scoring a hit and 15% of scoring a rout. That's before adding any bonuses. Take the Companion Cavaly units, for example. In a pitched battle they'll have a 30% chance of scoring a hit and a 15% chance of scoring a rout after taking their attack bonus (the circled AF) into account. A leadership bonus, if any, would add something to the chance of scoring a hit. Because they have an AF of 2, they have two such chances in each round of combat.
The Defense Factor of units does not mitigate the number of hits and routs scored. But units with larger DFs can absorb more damage, so it helps to have some heavy infantry in your front line. There is no advantage in terrain or to the defender in pitched battles. In practice, each side pounds away with its Attack Factors and absorbs punishment with its Defense Factors.
The chances for scoring hits and routs does depend on the type of battle. Defenders in cities have a better chance to score hits and routs because the city walls make it easier to repulse attacks. Similarly, attackers in city battles have smaller thresholds, and that makes it harder to hit the defenders. The more difficult the city (Captial, Major, Minor) the easier it is for the defenders to score.
Armies defending in their camps also get similar advantages, and the bonuses are adjusted. Camp Battles are only used at the "Normal" level and higher.
I hope that this helps, and please continue to ask questions.
Forced March Games, LLC