Portal server does not keep track of the User's messages. The information that you see on NetMail about the number of unread messages is obtained
from the Mail server using standard IMAP commands(using java mail api).
To retrieve the number of unread emails you can probably write some custom code using java mail api which uses the user credentials to login into the Mail server and retrieves this information.