Index: src/wp-includes/class-wp-user-query.php
===================================================================
--- src/wp-includes/class-wp-user-query.php	(revisione 39912)
+++ src/wp-includes/class-wp-user-query.php	(copia locale)
@@ -612,7 +612,7 @@
 		 * @param string $sql The SELECT FOUND_ROWS() query for the current WP_User_Query.
 		 */
 		if ( isset( $qv['count_total'] ) && $qv['count_total'] )
-			$this->total_users = $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );
+			$this->total_users = (int) $wpdb->get_var( apply_filters( 'found_users_query', 'SELECT FOUND_ROWS()' ) );
 
 		if ( !$this->results )
 			return;
Index: tests/phpunit/tests/user/query.php
===================================================================
--- tests/phpunit/tests/user/query.php	(revisione 39912)
+++ tests/phpunit/tests/user/query.php	(copia locale)
@@ -124,6 +124,13 @@
 		}
 	}
 
+	public function test_get_total() {
+		$users = new WP_User_Query( array( 'blog_id' => get_current_blog_id() ) );
+		$total_users = $users->get_total();
+
+		$this->assertSame( 13, $total_users );
+	}
+
 	/**
 	 * @dataProvider orderby_should_convert_non_prefixed_keys_data
 	 */
