Adding the first snippet to the functions.php of your wordpress theme will display a count of all images within the media library. Add the second snippet in the location you wish to display the count total.

About wpsnipp

WPSNIPP Was founded in 2010 by Kevin Chard and is a free resource dedicated to WordPress covering a wide range of topics. With over 640+ WordPress snippets, we also have tutorials, plugins, gallery and deals to enhance all aspects of your WordPress theme or blog.