I wrote a batch file that will generate a CSV file that lists the number of users per domain for each domain on your server....
http://josh.com/tsma/tsmadump/index.htm#usersperdomain
(You will need the free TSMADump tool available on that same page.)
You can easily import the file generated into Excel or Google docs to sort it and generate totals.
Note that I wrote this to double check the user count that SmarterMail showed on the top of the "Domains" admin page. My real user count was significantly lower than the number of users shown. Rebooting the server brought the numbers into agreement, but you should probably either count using this batch file or Reboot your server before upgrading your licence!