Index: wp-includes/user.php
===================================================================
--- wp-includes/user.php	(revision 18175)
+++ wp-includes/user.php	(working copy)
@@ -383,7 +383,8 @@
 				'search' => '',
 				'orderby' => 'login',
 				'order' => 'ASC',
-				'offset' => '', 'number' => '',
+				'offset' => '',
+				'number' => '',
 				'count_total' => true,
 				'fields' => 'all',
 				'who' => ''
@@ -418,6 +419,10 @@
 			$this->query_fields = "$wpdb->users.ID";
 		}
 
+		if ( $this->query_vars['count_total'] ) {
+			$this->query_fields = 'SQL_CALC_FOUND_ROWS ' . $this->query_fields;
+		}
+
 		$this->query_from = "FROM $wpdb->users";
 		$this->query_where = "WHERE 1=1";
 
@@ -517,6 +522,10 @@
 			$clauses = $meta_query->get_sql( 'user', $wpdb->users, 'ID', $this );
 			$this->query_from .= $clauses['join'];
 			$this->query_where .= $clauses['where'];
+
+			if ( 'OR' == $meta_query->relation ) {
+				$this->query_fields = 'DISTINCT ' . $this->query_fields;
+			}
 		}
 
 		if ( !empty( $qv['include'] ) ) {
@@ -545,8 +554,9 @@
 			$this->results = $wpdb->get_col("SELECT $this->query_fields $this->query_from $this->query_where $this->query_orderby $this->query_limit");
 		}
 
-		if ( $this->query_vars['count_total'] )
-			$this->total_users = $wpdb->get_var("SELECT COUNT(*) $this->query_from $this->query_where");
+		if ( $this->query_vars['count_total'] ) {
+			$this->total_users = $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );
+		}
 
 		if ( !$this->results )
 			return;
