Fixes pagination issue for Manage Courses

There were empty pages when "all courses" was selected with some courses hidden. The pagination wasn't taking into account hidden courses when getting the total number of filtered courses.