Method:  WshSpecialFolders.Count

object.Count ()

The Count method returns a Long value which is the number of items in the collection.

The following VBScript code uses the Count method to retrieve the number of special folders found on the current system.

Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshSpecialFolders = WshShell.SpecialFolders
intNum = WshSpecialFolders.Count
WScript.Echo "There are ", intNum, " Special Folders on this machine."

 
Output:
There are 18 Special Folders on this machine.