As in typical fashion, just as things are going well for King David and Israel, Satan in his conniving "rises up against Israel and incited David to sin." (I Chronicles 21) It's one of those sins that in and of itself really seems harmless. In fact it seems like it could be kind of helpful. David counts the people of Israel. The problem? It promotes confidence in human resources rather than confidence in God alone. Keep in mind that David is a commanding warrior and numbers are a crucial bit of information. So, the people were counted and then David realized his grave sin. David has a tendency to act rashly, but David has a tender heart toward God and he is quick to repent and seek restoration when he comes to his senses. This time, God gave David three options to choose from as consequences: three years of famine, three months of being swept away by the enemy in battle or three days of the sword of the Lord. How does one choose? David, the one whose heart was after God, whose heart rested in God's character that he had experienced time and again, exclaims, "Let me fall in to the hands of the Lord, for His mercy is very great..." David proclaims God's mercy over and over in the Psalms. David knew God's mercy.
True to God's character, as the angel was destroying Jerusalem by plague, "the Lord saw it and was grieved because of the calamity and said to the angel who was destroying the people, 'Enough! Withdraw your hand.'"
"God in his rich mercy, made us alive with Christ, even when we were dead in our transgressions." Ephesians 2:4
"I will sing of the mercies of the Lord forever..."