The question asks the following:
Quote
It should be possible to count the total number of mails in a mail folder and in a mail. The
total number of mails in a mail folder includes all its mails including its sub mail folders. Of
course, the total number of mails in a mail is 1.
So if you have nested folders a(1), contains b(2), contains c(3) where the number in brackets indicates the number of mails, i.e. leaf nodes in that folder,
Then the counts would be as follows:
* a = 1 + 2 + 3 = 6
* b = 2 + 3 = 5
* c = 3