The sample code you have provided looks right and is an exact copy of what is provided in the user guide under pagination. I also tested it in my site and it works correctly.
The issue then must be caused by other code inside the channel entries tag.
Comment out chunks of the code and test it yourself until it works/doesnt work.
Maybe youve used a plugin tag that is causing the conflict.
Edit: After checking your code in your earlier question spotted a tag for slideshow and suggest if you remove that code things will work.
And a search for slideshow leads me to suggest its custom code thats been written and is causing the conflict.
If you place this inside the slideshow tag, (i think) youll get a result that is causing the conflict with pagination
{total_pages}
Am i correct?