Dont forget the 'Next' at the end of that...

Code:
 
$c=0
For Each $folder In FolderList('%ProgramFiles%')
? $folder
$c=$c+1
Next