How to implement: Go To Page: < 1 2 3 4 5 6 7 8 9 10 >?

How do I implement something like this:

Go To Page: < 1 2 3 4 5 6 7 8 9 10 >

where each page would contain, say 10 posts?
(This would be something smilar to Google search result web page, where each page would have a certain number of results - I can click through to “2”, “3”, “4”, and so on…)

The closest documentation I’m seeing is Pagination, but the instruction isn’t clear.

It seems I have to do a global count of all the posts, cache it in a global variable, and that use that to generate all the pages. Is this the way to do it? Is there an easier way? Any ready or sample code?

It’s easy to implement with the data found in the link you gave.
number_pagers correspond to 10 in this case, you get the current page in current_index. The arrows are shown in the example in the page.
I guess we could add the numbers to the example on the docs site.