Complete Commentary on the Whole Bible, by Matthew Henry, at sacred-texts.com
David's numbering the people.
No mention is made in this book of David's sin in the matter of Uriah, neither of the troubles that followed it: they had no needful connexion with the subjects here noted. But David's sin, in numbering the people, is related: in the atonement made for that sin, there was notice of the place on which the temple should be built. The command to David to build an altar, was a blessed token of reconciliation. God testified his acceptance of David's offerings on this altar. Thus Christ was made sin, and a curse for us; it pleased the Lord to bruise him, that through him, God might be to us, not a consuming Fire, but a reconciled God. It is good to continue attendance on those ordinances in which we have experienced the tokens of God's presence, and have found that he is with us of a truth. Here God graciously met me, therefore I will still expect to meet him.