1 Chronicles 21:8

Then David prayed, “I have sinned badly in what I have just done, substituting statistics for trust; forgive my sin– I’ve been really stupid.”

David’s prayer of confession when he numbered the people.  He (and they) would pay a heavy price for David’s census.  Lesson One: You are never the only one affected by your sin.  Those around you will be affected also.
Numbering the people allowed David to trust in the great size of the populace (and therefore his army) rather than upon God.  We would like to throw stones at David here, except we are really no different.  How often do we trust in numbers (bank accounts, plans, efforts, people) rare than on God?  I am the foremost of sinners here.  Lesson Two: We must not substitute statistics for trust.