Sort database documents by number of pages

Is there any way that I can setup a rule to show a sort of the documents in a database by the number of pages? If not, word count?

Add the Length column, then sort by it.

Thanks Pete. I did not see length so I just sorted by Word Count. Anyway, my shortcoming was thinking of doing rule when you pointed that I can just add a column. That served the purpose. Thanks!