I need to create simple pagination of objects, but when I read manual I found out that query.setRange(5, 10); will fetch 10 objects, even when only 5 objects are needed.
There's an article about this very topic on the App Engine site:
http://code.google.com/appengine/articles/paging.html
The examples are in Python, but they're simple enough that you can probably translate to Java fairly easily.
Here's a Java implementation, which I have not read or tested.