if there are subfoders within subfolders, do you want to count all?
if so you would need some recursive routine
you could try like
Dim cnt As Collection
Sub allfolders(f As MAPIFolder)
Dim subf As MAPIFolder
cnt.Add f.Items.Count, f.Name
For Each subf In f.Folders
allfolders subf
Next
End Sub
Sub getall()
Dim ibox As MAPIFolder
Set cnt = New Collection
Set ibox = Session.GetDefaultFolder(olFolderInbox)
allfolders ibox
End Sub
each folder will be added to the collection, indexed by name, note this particular code will error if folder structure can have multiple subfolder with same name
return results like msgbox cnt("inbox") or any other folder name