Index: src/wp-includes/post.php
===================================================================
--- src/wp-includes/post.php	(revision 36390)
+++ src/wp-includes/post.php	(working copy)
@@ -2204,7 +2204,7 @@
 function wp_count_posts( $type = 'post', $perm = '' ) {
 	global $wpdb;
 
-	if ( ! post_type_exists( $type ) )
+	if ( ! post_type_exists( $type ) && ( ! is_multisite() || empty( $GLOBALS['_wp_switched_stack'] ) ) )
 		return new stdClass;
 
 	$cache_key = _count_posts_cache_key( $type, $perm );
@@ -2218,7 +2218,7 @@
 	$query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s";
 	if ( 'readable' == $perm && is_user_logged_in() ) {
 		$post_type_object = get_post_type_object($type);
-		if ( ! current_user_can( $post_type_object->cap->read_private_posts ) ) {
+		if ( ! $post_type_object || ! current_user_can( $post_type_object->cap->read_private_posts ) ) {
 			$query .= $wpdb->prepare( " AND (post_status != 'private' OR ( post_author = %d AND post_status = 'private' ))",
 				get_current_user_id()
 			);
