The Count method returns a Long value which is the number of items in the collection.
Set WshShell =
WScript.CreateObject("WScript.Shell")
Set WshSpecialFolders =
WshShell.SpecialFolders
intNum =
WshSpecialFolders.Count
WScript.Echo "There are ", intNum, "
Special Folders on this machine."There are 18 Special Folders on
this machine.This VBScript code uses the Count method to retrieve the number of special folders found on the current system.