Verses 26 and 27 highlight Mormon’s real intent in describing wars. While he does indicate that there were many who died, his intent is not to describe the casualties of physical war, but the more serious casualties of spiritual war. These wars are not simply battles for territory or tribute, but to Mormon a war for the souls of men. Thus when he describes the dead, he describes them in spiritual terms.
The two categories that he lists are those who listen to a good spirit and those who listen to a bad spirit. Each of those two types receives an eternal reward that is likewise listed only in the two extremes; eternal happiness or eternal misery. While this surely applies to each individual, Mormon is using this categorization collectively, and it may be more directed to the Amlicites than the Lamanites. Mormon has told this story because of the Amlicites, as witnessed by his editorial aside which moralizes on the events of the war. That moralizing insertion emphasized the apostasy of the Amlicites and their acceptance of the Lamanite cursing. For Mormon, these Nephites have become Lamanites. These who were with them are now opposed to them, and opposed spiritually, not just politically.
With that perspective, Mormon classes those who have died into the two spiritual categories. There are those who have listened to a good spirit, the Nephites; and those who have listed to a bad spirit, the Amlicites (and including the Lamanites).