Getting Total VM Count and New VM Count

Hi,
I am trying to get total number of voicemails and the total number of new Voicemails from Asterisk. My understadning is that VMCOUNT will give me the total number of Voicemail Messages from the VM folder. Challenge is how to get the New Vociemail Count ( in other words total Number of Unaccessed Voicemails ).
I need to get these 2 counts so that I can call a PHP script which in trun will send a Voicemail Notification SMS with these 2 values.

Current Dialplan ( only the relevant Portion ) Looks like:-
exten => _19549776740,n(vm),VoiceMail(${SS7_ORIG_CALLED_NUM}@default) — Works
exten => _19549776740,n,set(total=${VMCOUNT(${SS7_ORIG_CALLED_NUM}@default)}) – Yet to be tried

Regards,
Girish

Can somebody please provide an example of using VMCOUNT on different folder other then INBOX for e.g. I am trying to use this is Dialplan

exten => _19549776740,n,set(oldvm=${VMCOUNT(${SS7_ORIG_CALLED_NUM}@default|Old)})

but somehow it is not working . If I absolutely must use full path then it would be of great help if it can be elaborated by an example.

Regards,
Girish