Below I will show you a method to count the number of public folders you have in your Exchange organisation for both Exchange 2003 and Exchange 2007/2010.
For Exchange 2003 download PFDavAdmin from the following location:
In PFDavAdmin click Tools --> Options. Enable logging to a file.
Then click Tools --> Content Report. Select All public folders for the scope.
Specify a location where to save the report.
When the report finishes generating you will have on your screen the total number of public folders residing on the server.
Exchange 2007/2010 has native powershell support. Chris Schrimsher has produced a script that will automatically count the number of public folders you have in your organisation. To get a copy of his script please view the following link: