Index: xmlrpc.php
===================================================================
--- xmlrpc.php	(revision 11845)
+++ xmlrpc.php	(working copy)
@@ -596,8 +596,15 @@
 		$blog_id	= (int) $args[0];
 		$username	= $args[1];
 		$password	= $args[2];
-		$num_pages	= (int) $args[3];
 
+		// If a specific page count was provided, use it, otherwise default to 10 pages
+		if (count($args) >= 4) {
+			$page_limit = (int) $args[3];
+		} 
+		else {
+			$page_limit = 10;
+		}
+
 		if ( !$user = $this->login($username, $password) ) {
 			return $this->error;
 		}
@@ -607,19 +614,14 @@
 
 		do_action('xmlrpc_call', 'wp.getPages');
 
-		$page_limit = 10;
-		if( isset( $num_pages ) ) {
-			$page_limit = $num_pages;
-		}
-
 		$pages = get_posts( array('post_type' => 'page', 'post_status' => 'all', 'numberposts' => $page_limit) );
-		$num_pages = count($pages);
+		$pages_found = count($pages);
 
 		// If we have pages, put together their info.
-		if($num_pages >= 1) {
+		if($pages_found >= 1) {
 			$pages_struct = array();
 
-			for($i = 0; $i < $num_pages; $i++) {
+			for($i = 0; $i < $pages_found; $i++) {
 				$page = wp_xmlrpc_server::wp_getPage(array(
 					$blog_id, $pages[$i]->ID, $username, $password
 				));
