hmmm, I would have went with:

$count = UBound(FolderList('%ProgramFiles%'))

myself

-Shawn