If you need to find out how many mailboxes you have on your Exchange Server In a simple and quick way you can you the cmdlet below:
To find the number of all mailboxes type:
Get-mailbox –resultsize unlimited | measure-object
To find the number of shared Mailboxes type:
Get-mailbox -resultsize unlimited -RecipientTypeDetails sharedmailbox |measure-object
To find the number of User Mailboxes type:
Get-mailbox -resultsize unlimited -RecipientTypeDetails usermailbox |measure-object