Index: src/wp-includes/author-template.php
===================================================================
--- src/wp-includes/author-template.php	(revision 28877)
+++ src/wp-includes/author-template.php	(working copy)
@@ -336,7 +336,7 @@
 		'orderby' => 'name', 'order' => 'ASC', 'number' => '',
 		'optioncount' => false, 'exclude_admin' => true,
 		'show_fullname' => false, 'hide_empty' => true,
-		'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true,
+		'feed' => '', 'feed_image' => '', 'feed_type' => '', 'post_type' => '', 'echo' => true,
 		'style' => 'list', 'html' => true, 'exclude' => '', 'include' => ''
 	);
 
@@ -348,8 +348,18 @@
 	$query_args['fields'] = 'ids';
 	$authors = get_users( $query_args );
 
+	if( is_array( $post_type ) ) {
+
+		$post_type = 'post_type IN ( ' . implode( ',', array_map( 'sanitize_key', $args['post_type'] ) ) . ' )';
+
+	} else {
+
+		$post_type = 'post_type = ' . sanitize_key( $args['post_type'] );
+
+	}
+
 	$author_count = array();
-	foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author" ) as $row ) {
+	foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE $post_type " . get_private_posts_cap_sql( 'any' ) . " GROUP BY post_author" ) as $row ) {
 		$author_count[$row->post_author] = $row->count;
 	}
 	foreach ( $authors as $author_id ) {
@@ -440,7 +450,7 @@
 	global $wpdb;
 
 	if ( false === ( $is_multi_author = get_transient( 'is_multi_author' ) ) ) {
-		$rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 2");
+		$rows = (array) $wpdb->get_col("SELECT DISTINCT post_author FROM $wpdb->posts WHERE post_status = 'publish' LIMIT 2");
 		$is_multi_author = 1 < count( $rows ) ? 1 : 0;
 		set_transient( 'is_multi_author', $is_multi_author );
 	}
Index: src/wp-includes/post.php
===================================================================
--- src/wp-includes/post.php	(revision 28877)
+++ src/wp-includes/post.php	(working copy)
@@ -5046,7 +5046,7 @@
  * @param bool $public_only Optional. Only return public posts. Skips cap checks for $current_user.  Default is false.
  * @return string SQL WHERE code that can be added to a query.
  */
-function get_posts_by_author_sql( $post_type, $full = true, $post_author = null, $public_only = false ) {
+function get_posts_by_author_sql( $post_type = 'post', $full = true, $post_author = null, $public_only = false ) {
 	global $wpdb;
 
 	// Private posts
@@ -5067,11 +5067,21 @@
 		$cap = $post_type_obj->cap->read_private_posts;
 	}
 
+	if( is_array( $post_type ) ) {
+
+		$post_type_where = 'post_type IN ( ' . implode( ',', array_map( 'sanitize_key', $post_type ) ) . ' )';
+
+	} else {
+
+		$post_type_where = 'post_type = ' . sanitize_key( $post_type );
+
+	}
+
 	if ( $full ) {
 		if ( null === $post_author ) {
-			$sql = $wpdb->prepare( 'WHERE post_type = %s AND ', $post_type );
+			$sql = $wpdb->prepare( 'WHERE %s AND ', $post_type_where );
 		} else {
-			$sql = $wpdb->prepare( 'WHERE post_author = %d AND post_type = %s AND ', $post_author, $post_type );
+			$sql = $wpdb->prepare( 'WHERE post_author = %d AND %s AND ', $post_author, $post_type_where );
 		}
 	} else {
 		$sql = '';
Index: src/wp-includes/user.php
===================================================================
--- src/wp-includes/user.php	(revision 28877)
+++ src/wp-includes/user.php	(working copy)
@@ -256,10 +256,10 @@
  * @param int $userid User ID.
  * @return int Amount of posts user has written.
  */
-function count_user_posts($userid) {
+function count_user_posts( $userid, $post_type = false ) {
 	global $wpdb;
 
-	$where = get_posts_by_author_sql('post', true, $userid);
+	$where = get_posts_by_author_sql( $post_type, true, $userid );
 
 	$count = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts $where" );
 
Index: tests/phpunit/tests/comment/query.php
===================================================================
--- tests/phpunit/tests/comment/query.php	(revision 28877)
+++ tests/phpunit/tests/comment/query.php	(working copy)
@@ -180,4 +180,43 @@
 		$this->assertEquals( $users[1], $comments[2]->user_id );
 
 	}
+
+	/**
+	 * @ticket 25386
+	 */
+	function test_get_comments_in() {
+		
+		$comment_id = $this->factory->comment->create( array( 'comment_post_ID' => $this->post_id ) );
+		$comment_id2 = $this->factory->comment->create( array( 'comment_post_ID' => $this->post_id ) );
+		$comment_id3 = $this->factory->comment->create( array( 'comment_post_ID' => $this->post_id ) );
+
+		$comments = get_comments( array( 'comment__in' => array( $comment_id, $comment_id2 ) );
+
+		$this->assertCount( 2, $comments );
+
+		$this->assertEquals( $comment_id, $comments[0]->comment_ID );
+		$this->assertEquals( $comment_id2, $comments[1]->comment_ID );
+
+		$comments = get_comments( array( 'comment__in' => array( $comment_id3 ) );
+
+		$this->assertCount( 1, $comments );
+		$this->assertEquals( $comment_id3, $comments[0]->comment_ID );
+
+	}
+
+	/**
+	 * @ticket 25386
+	 */
+	function test_get_comments_not_in() {
+		
+		$comment_id  = $this->factory->comment->create( array( 'comment_post_ID' => $this->post_id ) );
+		$comment_id2 = $this->factory->comment->create( array( 'comment_post_ID' => $this->post_id ) );
+		$comment_id3 = $this->factory->comment->create( array( 'comment_post_ID' => $this->post_id ) );
+
+		$comments = get_comments( array( 'comment__not_in' => array( $comment_id, $comment_id2 ) );
+
+		$this->assertCount( 1, $comments );
+		$this->assertEquals( $comment_id3, $comments[0]->comment_ID );
+
+	}
 }
