One of the features of eDiscovery in Exchange 2013 and greater is the ability to do a search of Mailbox and just return the statistics on particular Items (or searches). This allows you to do a really quick search without the need to process any of the ResultSet of the Search. To limit the Items types returned by an eDiscovery query you can use the kind Keyword property in a KQL query. The feature set of which has recently been updated https://technet.microsoft.com/en-us/library/dn508399(v=exchg.150).aspx to now allow you to include Lync (or IM) items. So one little cool thing you can do with this using a multiple OR logic query with eDiscovery is get a quick list of the number of exchange Items by type in a Mailbox eg the KQL for this would look like
"kind:email OR kind:meetings OR kind:contacts OR kind:tasks OR kind:notes OR kind:IM OR kind:rssfeeds OR kind:voicemail"
and this would produce a report that looks like
I've put together a sample of a script to do this which you can download form here. To run the script use
Get-MailboxItemTypeStats -MailboxName email@example.com -OutputFileName reportfile.csv
The code itself looks like