2 Samuel 21: 15 - 22 & Chronicles 20: 4-8 Are about the battles between David and the Philistines and the descendants of the giant in Gath killed by David and his soldiers.
Davide writes Psalm 36: 1-12 and speaks about man's wickedness and God's goodness.
2 Samuel 24: 1- 25 and 1 Chronicles 21: 1- 6, 27: 23-24. 27: 7-13, 21: 14-17, 21: 18-30
David numbers the people.
The Lords anger burned against Israel again, and it stirred up David against them to say "Go, count the people of Israel and Judah.
So the king told Joab the commander of the army to go through all the tribes of Israel from Dan to Beer-sheeba and register the troops so I can know their number. Joab asked the king why he wants to do this. Joab obeyed the king and did what was required of him. There were 800,00 fighting men from Israel and 500,000 men from Judah.
What I found odd that in Samuel and Chronicles the Numbers vary in Chronicles in Israel were 1,100,000 swordsmen and in Judah itself 470,000 swordsmen but he did not include Levi and Benjamin in the count because the king's command was detestable to him. in 1 Chronicles 27: 23-24 David didn't count the men aged 20 or under, for the Lord had said He would make Israel as numerous as the stars of heaven. Joab son of Zeruiah began to count them, but he didn't complete it There was wrath against Israel because of this census, and the number was not entered in the Historical Record of King David.
David's conscience trouble him after he had taken a census of the troops "I have sinned greatly in what I've done. Now , Lord because I've been very foolish please take away your servant's guilt
And in so doing David had a choice which was given to him by God.
Do you want three years of Famine to come on your land, to flee from your foes three months while they pursue you, or to have a plague in your land three days; So David thought this over and answered Gad I have great anxiety. Please let us fall into the Lord's hands because His mercies are great but don't let me fall into human hands.
And so the plague began but Gods mercies on David was great and relieved him of his anquish and David built a altar sacrafice before the Lord
Each person should do as he has decided in his heart not out of regret or out of necessity, for God loves a cheerful giver 2 Chr. 9:7 and the Lord forgave David.