Ambrose of Milan
His error lay in his desire to ascertain the total of all those accompanying him, a knowledge that rightfully belongs only to God.
And the king said to Joab the general of his army: Go through all the tribes of Israel from Dan to Bersabee, and number ye the people that I may know the number of them.
וַיֹּ֨אמֶר הַמֶּ֜לֶךְ אֶל־יוֹאָ֣ב ׀ שַׂר־הַחַ֣יִל אֲשֶׁר־אִתּ֗וֹ שֽׁוּט־נָ֞א בְּכָל־שִׁבְטֵ֤י יִשְׂרָאֵל֙ מִדָּן֙ וְעַד־בְּאֵ֣ר שֶׁ֔בַע וּפִקְד֖וּ אֶת־הָעָ֑ם וְיָ֣דַעְתִּ֔י אֵ֖ת מִסְפַּ֥ר הָעָֽם׃
3 Church Fathers comment on this verse
His error lay in his desire to ascertain the total of all those accompanying him, a knowledge that rightfully belongs only to God.
King David succumbed to the allure of pride, desiring to display the might of his reign. He ordered a census of all able-bodied men, a practice that was uncommon among the Hebrews. Even a just man is vulnerable to stumbling if he succumbs to despair.
You assert that the wrongdoing of a handful of individuals cannot bring calamity upon all. However, I have previously pointed out, multiple times, that the sin of one individual led to the downfall of many within the people of God, just as the community faced consequences because of Achan’s transgression (See Num. 7:1) or as death resulted from King David's census. The body of Christ resembles an eye; even the tiniest speck of dust can completely hinder its vision. In the same way, the sinful actions of a few members within the Church can dim the brilliance of its glory.
Passages read together with this verse.