Added code to get total page numbers from a thread.
And delete post decreases the thread number of posts.