add_action( 'add_meta_boxes', 'attached_images_meta' );
function attached_images_meta() {
$screens = array( 'post', 'page' ); //add more in here as you see fit
foreach ($screens as $screen) {
add_meta_box(
'attached_images_meta_box', //this is the id of the box
'Attached Images', //this is the title
'attached_images_meta_box', //the callback
$screen, //the post type
'side' //the placement
);
}
}
function attached_images_meta_box($post){
$args = array('post_type'=>'attachment','post_parent'=>$post->ID);
$count = count(get_children($args));
echo '<a href="#" class="button insert-media add_media" data-editor="content">'.$count.' Images</a>';
}
The above will link to the media uploader. I added the link because the screenshot you posted looked like a link. Feel free to remove the link like so:
echo $count.' Images';
Just pop this in your functions.php, custom plugin, etc.