1 Chronicles 27:23-24

23 David did not count those below twenty years of age, for the a  Lord had promised to make Israel as many as the stars of heaven. 24 Joab the son of Zeruiah began to count, but b did not finish. Yet c wrath came upon Israel for this, and the number was not entered in the chronicles of King David.

Copyright information for ESV