"And David's heart condemned him after he had numbered the people. And David said unto the Lord, I have sinned greatly in what I have done: Oh Lord, take away the iniquity of thy servant." (2 Samuel 24:10)
In the passage above, David is convicted in his own heart of not adhering to God's promise in Genesis 22:17. There God promised that, His people would be as innumerable as the stars of heaven, as the sand upon the seashore. Realizing he should have taken God at His Word, David confessed his sin, of submitting to the prompting of Satan (1 Chronicles 21:1), to get statistics that would swell his head with pride and make him independent of God. Although he was forgiven, he also had to endure Gods punishment - three days of plague upon all of Israel. (2 Samuel 24:15) Likewise, when David had Uriah the Hittite killed with the sword and took his wife Bathsheba for his own - David was forgiven but, there were consequences for his sin - the loss of the child born to Bathsheba and the promise that, what David did in secret would be done to him openly before all of Israel. (2 Samuel 12:13-14)
The Holy Spirit will always convict the Christian, the blood of Jesus will always wash us clean and the Father will always correct, chasten, punish His children. Why? Because He loves us. God forgives us, He gives us peace, but He will not pamper us.
The Truth
"My son, despise not the chastening of the Lord, nor be discouraged when you are rebuked by Him; For whom the Lord loves He chastens, and scourges every son whom He receives." (Hebrews 12:5-6)