Display only custom post type count for current author on the “At a Glance” dashboard widget

I think what you’re after is:

   // The user is logged, retrieve the user id (this needs to go above your foreach)
    $user_ID = get_current_user_id(); 
   // Now we have got the user's id, we can pass it to the foreach of your function(this needs to go into your foreach:  
    echo '<li>Number of '.$post_type->name.' posts published by me: ' . count_user_posts( $user_ID , $post_type->name ).'</li>';