I Chronicles 27:23 Halakhah

וְלֹא־נָשָׂ֤א דָוִיד֙ מִסְפָּרָ֔ם לְמִבֶּ֛ן עֶשְׂרִ֥ים שָׁנָ֖ה וּלְמָ֑טָּה כִּ֚י אָמַ֣ר יְהוָ֔ה לְהַרְבּ֥וֹת אֶת־יִשְׂרָאֵ֖ל כְּכוֹכְבֵ֥י הַשָּׁמָֽיִם׃

But David took not the number of them from twenty years old and under; because the LORD had said He would increase Israel like to the stars of heaven.

Read halakhic rulings (Jewish law) on I Chronicles 27:23: and classical halakhic sources.