diff --git a/google_appliance.admin.inc b/google_appliance.admin.inc
index 3412e8d..4924311 100644
--- a/google_appliance.admin.inc
+++ b/google_appliance.admin.inc
@@ -219,7 +219,7 @@ function google_appliance_admin_settings_validate($form, &$form_state) {
 
   // results per page must be on a range that will be accepted by the device upon querying
   $results_per_page_validate_options = array('options' => array(
-    'max_range' => 1000,
+    'max_range' => GOOGLE_APPLIANCE_MAX_RESULTS,
     'min_range' => 1
   ));
   if ( filter_var($form_state['values']['google_appliance_results_per_page'], FILTER_VALIDATE_INT, $results_per_page_validate_options) === FALSE ) {
diff --git a/google_appliance.module b/google_appliance.module
index 258c6b0..15d7ec2 100644
--- a/google_appliance.module
+++ b/google_appliance.module
@@ -11,6 +11,8 @@ require_once(drupal_get_path('module', 'google_appliance') . '/google_appliance.
 // default theme impementations
 require_once(drupal_get_path('module', 'google_appliance') . '/theme/google_appliance.theme.inc');
 
+define('GOOGLE_APPLIANCE_MAX_RESULTS', 1000);
+
  /**
  * Implements hook_help().
  */
@@ -617,9 +619,11 @@ function google_appliance_parse_device_response_xml($gsa_xml) {
       // @see google_appliance.theme.inc
     }
     else {
-
-      // store metrics for stat reporting
-      $results['total_results'] = (integer) $payload->RES->M; // somewhat unreliable
+      // store metrics for stat reporting, pager
+      $results['total_results'] = (integer) $payload->RES->M;
+      if ($results['total_results'] > GOOGLE_APPLIANCE_MAX_RESULTS) {
+        $results['total_results'] = GOOGLE_APPLIANCE_MAX_RESULTS;
+      }
       $results['last_result'] = (string) $payload->RES['EN'];
 
       // check if there is an result at all ($payload->RES),
diff --git a/testing/google_appliance.test b/testing/google_appliance.test
index 5fe1be5..d0af85b 100644
--- a/testing/google_appliance.test
+++ b/testing/google_appliance.test
@@ -277,7 +277,7 @@ class GoogleApplianceSettingsValidateResultsPerPage extends DrupalWebTestCase {
     );
 
     // at upper boundary
-    $settings['results_per_page'] = 1000;
+    $settings['results_per_page'] = GOOGLE_APPLIANCE_MAX_RESULTS;
     $this->drupalPost(
       'admin/config/search/google_appliance/settings',
       $settings, t('Save configuration')
