Is there a way to know the total number of posts before the loop starts? I'm thinking in use two loops. The first will do the counting, while the second one will handle the content. However, I don't think this approach is 'elegant'. Any other solutions?
The number of all posts for a given query is in
The number of all posts for just the page you are seeing is in
To see all available variables test it with: