The Book of 2 Samuel Chapters 23 & 24 ESV Version.
2 Samuel Chapters 23, this chapter continues with the rest of the song that King David sang to the lord. David sings about how the spirit of God spoke through him and how if his house was not right with the Lord then he would not receive salvation. The words of the song also describe that evil men should be cast aside just like they were thorns.
2 Samuel Chapters 24, the Lord told King David to take a census of Judah and Israel. David told Joab and his army commanders to go to all of the tribes in Israel and Judah so they could enroll fighting men because he needed to know how many there actually were.