Most resources claim that the book of Psalms is the longest book in the Old Testament, and therefore the Bible.

The claim is probably wrong.

If the calculation is based on the number of verses or the number of “chapters” or the number of pages, it is correct. But since those aren’t part of the original, they properly shouldn’t be considered to be the right criteria.

And if we’re being technical, English word-count shouldn’t be sufficient, either.

Here is a more refined set of date, courtesy of David J. Reimer (senior lecturer, Hebrew and Old Testament University of Edinburgh, who penned the notes on Ezekiel for the ESV Study Bible).

“Graphic units” counts the number of Hebrew words in a particular books using BibleWorks (e.g., there are seven “graphic units” in Genesis 1:1). “Morphological units” was found according to the Groves-Wheeler Westminster Morphological database (separates prefixed elements, but not pronominal suffixes; e.g., there are eleven in Genesis 1:1). The “Bytes” figure calculated the length of the Hebrew book in ASCII format (i.e., so there would be no interference from extraneous word-processor code).