9 Joab gave up the sum of the counting of the people to the king: and there were in Israel eight hundred thousand valiant men who drew the sword; and the men of Judah were five hundred thousand men.
2 Samuel 24:9 Cross References - WEB
Numbers 1:44-46
44 These are those who were counted, whom Moses and Aaron counted, and the twelve men who were princes of Israel, each one for his fathers’ house.
45 So all those who were counted of the children of Israel by their fathers’ houses, from twenty years old and upward, all who were able to go out to war in Israel—
46 all those who were counted were six hundred three thousand five hundred fifty.
1 Chronicles 21:5-6
5 Joab gave up the sum of the census of the people to David. All those of Israel were one million one hundred thousand men who drew a sword; and in Judah were four hundred seventy thousand men who drew a sword.
6 But he didn’t count Levi and Benjamin among them; for the king’s word was abominable to Joab.
1 Chronicles 27:23-24
23 But David didn’t take the number of them from twenty years old and under, because Yahweh had said he would increase Israel like the stars of the sky.
24 Joab the son of Zeruiah began to take a census, but didn’t finish; and wrath came on Israel for this. The number wasn’t put into the account in the chronicles of king David.