God stirred David's heart to take a census.
David commanded his commander to
take a census of all the people in the land.
But Joab replied,
"My king, why do you want to do this?
why do you cause us to sin against God?
you know well enough that it was not
the number of people that gave us victory"
so they traveled throughout the land to count the people.
God was very displeased with what David had done,
and God punished Israel for it.
Then David said to God,
"I have sinned against you,
please, forgive me for my foolishness."
God gave David 3 choices;
3 years of famine,
3 months of fleeing from the enemies,
3 days of plague.
David chose the 3rd punishment
and God sent a plague upon Israel for 3 days.
David also built an altar to God and
and the plague was stopped.