1 Chronicles 21:5-8

21:5 Joab reported to David the number of warriors. In all Israel there were 1,100,000 sword-wielding soldiers; Judah alone had 470,000 sword-wielding soldiers. 21:6 Now Joab did not number Levi and Benjamin, for the king’s edict disgusted him. 21:7 God was also offended by it, so he attacked Israel.

21:8 David said to God, “I have sinned greatly by doing this! Now, please remove the guilt of your servant, for I have acted very foolishly.”