This article will show you how to get the number of mailboxes hosted on Exchange Server 2010 and on Exchange server 2010 Database.
This cmdlet will give you the number of mailboxes hosted on a specific exchange Server
Get-Mailbox -Server SERVERNAME | Group-Object -Property count |Select-Object count |ft -AutoSize
This cmdlet will give you the number of mailboxes hosted on a specific exchange Server database
Get-Mailbox –database DBNAME| Group-Object -Property count |Select-Object count |ft -AutoSiz