Index: media.php
===================================================================
--- media.php	(revision 12592)
+++ media.php	(working copy)
@@ -695,7 +695,9 @@
 		'columns'    => 3,
 		'size'       => 'thumbnail',
 		'include'    => '',
-		'exclude'    => ''
+		'exclude'    => '',
+		'start'      => '1',
+		'count'      => 'all',
 	), $attr));
 
 	$id = intval($id);
@@ -720,6 +722,17 @@
 	if ( empty($attachments) )
 		return '';
 
+	$num_attachments = count( $attachments );
+	$start = absint( $start );
+
+	if ( $start > $num_attachments )
+		return '';
+
+	if ( 'all' != $count )
+		$count = absint( $count );
+	else
+		$count = $num_attachments;
+
 	if ( is_feed() ) {
 		$output = "\n";
 		foreach ( $attachments as $att_id => $attachment )
@@ -755,8 +768,14 @@
 		<!-- see gallery_shortcode() in wp-includes/media.php -->
 		<div id='$selector' class='gallery galleryid-{$id}'>");
 
-	$i = 0;
+	$i = 0; $counter = 0;
 	foreach ( $attachments as $id => $attachment ) {
+		$counter++;
+		if ( $counter < $start )
+			continue;
+		if ( $counter > ( $start + $count ) )
+			break;
+
 		$link = isset($attr['link']) && 'file' == $attr['link'] ? wp_get_attachment_link($id, $size, false, false) : wp_get_attachment_link($id, $size, true, false);
 
 		$output .= "<{$itemtag} class='gallery-item'>";
