protected function set_total_videos_count()
 {
     if (isset($_GET['external_video_provider_id']) && isset($_GET['tag_ids'])) {
         $count = VideoLibrary_DatabaseHelper::get_external_videos_count_for_tag_ids_and_external_video_provider_id($this->get_external_video_library_id(), $this->get_tag_ids(), $this->get_external_video_provider_id());
     } elseif (isset($_GET['external_video_provider_id'])) {
         $count = VideoLibrary_DatabaseHelper::get_external_videos_count_for_provider_id($this->get_external_video_library_id(), $this->get_external_video_provider_id());
     } elseif (isset($_GET['tag_ids'])) {
         $count = VideoLibrary_DatabaseHelper::get_external_videos_count_for_tag_ids($this->get_external_video_library_id(), $this->get_tag_ids(), NULL);
     } elseif (isset($_GET['q'])) {
         $count = VideoLibrary_SearchHelper::get_external_videos_count_for_search_string($this->get_external_video_library_id(), $this->get_search_string());
     } else {
         $count = VideoLibrary_DatabaseHelper::get_external_videos_count($this->get_external_video_library_id());
     }
     $this->total_videos_count = $count;
 }
 public static function get_external_videos_count_for_search_string($external_video_library_id, $search_string)
 {
     return VideoLibrary_SearchHelper::get_external_videos_for_search_string($external_video_library_id, $search_string, NULL, NULL, array('count' => TRUE));
 }