added a generic function for counting elements and size of media items
added code to remove newly added ExcludeDirs and ExcludeItems from ContentLibrary