1 Chronicles 21:5-6

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.

1 Chronicles 27:23-24

27:23 David did not count the males twenty years old and under, for the Lord had promised to make Israel as numerous as the stars in the sky. 27:24 Joab son of Zeruiah started to count the men but did not finish. God was angry with Israel because of this, so the number was not recorded in the scroll called The Annals of King David.