Paste the following into the powershell command prompt:

Get-MailboxStatistics -Database "mailbox database" | Sort -Property DisplayName | ft DisplayName, @{expression={$_.totalitemsize.value.ToMB()};label="Mailbox Size(MB)"}, itemcount > c:\mailboxes.txt

a text file located at c:\mailboxes.txt should now contain the mailbox size information with item counts for each user.