JODF > Tutorial > Word count

The example shows you how to open a text document and count number of words and paragraphs.