As poetry, the Psalms were used as worship material for the Hebrews and later Jews. Many of them list David as the author. With 150 songs, the book has both the shortest chapter in the Bible (Ps. 117) and the longest (Ps. 119).
Enumeration of passages from the Psalms requires care. Jewish and Christian versification often does not coincide, since superscriptions (found at the beginning of many psalms) are numbered in the Jewish tradition, but not in the Christian tradition. Within Christian Bibles, the Orthodox and Catholic "chapter" divisions follow the Septuagint in which Pss 9 and 10 in the Jewish and Protestant Bibles are regarded as a single psalm, thus throwing out the numbering between them by one. In the latter third of the Psalms there are several other inconsistencies between these versions, before the enumeration again coincides in the final three psalms (Pss 148-150).
The Septuagint also preserves a 151st psalm with the heading: "This psalm is ascribed to David as his own composition (though it is outside the number)..." (NRSV).