1 Chronicles 23:3
Now the Levites were numbered from the age of thirty years and upward: and their number by their polls, man by man, was thirty and eight thousand. Now the Levites were numbered from the age of thirty years and upward: and their number by their polls, man by man, was thirty and eight thousand.
When David was old and full of days, he brought together all the princes of Israel with the priests and the Levites to perfect the organization for Solomon's reign, and the numbering of the Levites belongs to that gathering. They were counted individually, man by man by polls, from thirty years old and upward, and their total was thirty-eight thousand men. The counting was not a mere census but the carrying out of a carefully studied plan for apportioning special duties to the men best fitted for them.
That principle of fitting assignment was applied first in David's administration of the government of Israel and then to every branch of service by the priests and Levites, the civil officers, and the army. Of those numbered, twenty-four thousand were to set forward the work of the house of the Lord. Six thousand were to serve as officers and judges, four thousand were to serve as porters, and four thousand were to praise the Lord with instruments.