Update pagination buttons when filtering

The paginationCount needs to be set dynamically taking into account any
filter that might limit the total number of posts.