I think you are confusing attacks with hits.
Your formation of infantry charges a troll.
The troll swings first. He has 4 attacks, and a fight of 7 to your fight of 3, so he gets three more dice for battle skill, for a total of 7 dice.*
Compare the troll's strength of 7 to your defense of 3 on the chart. If I recall correctly, he hits you on a 3+. So the troll rolls 7 dice, and scores 6, 5, 4, 4, 3, 3, 1, for a total of 6 hits. You lose 6 warriors from the back of your formation- somewhere not in combat.
Now your infantry can attack. Only one stand can be in contact with the troll, due to his round base, so you get 8 base attacks +1 for charging for a total of 9 dice (nothing for battle skill as your fight is not higher than the troll's). Go to the chart and compare your strength of 3 to the troll's defense of 7. I think you need 6's. So you roll and get 6, 6, 6, 6, 6, 3, 2, 2, 1, for a total of 5 hits.
The troll is resilience 2, so four of your hits count (as two), and the third is ignored, lost, soaked up.
So now you get two rolls on the Hard to Kill table. You take you single die and roll. If you roll a one, nothing happens. If you roll a six, the troll dies. Any other roll results in at least one wound counter being placed on the troll. For your first roll, you get a 5- two wound counters to the troll. Your next roll is a 4, plus two from the wound counters makes six, and the troll dies. Wound counters are persistent, cumulative plusses to rolls on the Hard-to-Kill table.
Check out
this thread for answers to more questions.
*7-3 = 4. Four more hits, eight dice. Math, feh! Treat all numbers and stats in this post as notional, I don't have the book with me.