Find out total number of pages in global query on archive page?
global $wp_query; echo $wp_query->max_num_pages; This shows the number of pages for the current query. If you want to determine the actual number of posts found by the current query, you may use $wp_query->found_posts Source:- http://codex.wordpress.org/Class_Reference/WP_Query