2 David assembled all the leaders of Israel and the priests and the Levites. 3 The Levites, thirty years old and upward, were numbered, and the total was thirty-eight thousand men. 4 "Twenty-four thousand of these," David said, "shall have charge of the work in the house of the Lord, six thousand shall be officers and judges 5 four thousand gatekeepers, and four thousand shall offer praises to the Lord with the instruments which I have made for praise." 6 And David organized them in divisions corresponding to the sons of Levi: Gershom, Kohath, and Merar'i.
Matthew Henry's Commentary on 1 Chronicles 23:2-6
Commentary on 1 Chronicles 23:1-23
(Read 1 Chronicles 23:1-23)
David, having given charge concerning the building of the temple, settles the method of the temple service, and orders the officers of it. When those of the same family were employed together, it would engage them to love and assist one another.