The script works fine as it should, it shows the folders contained on a given path, but I am trying to add a counter to know how many there are but it won't work I've tryed many things, googled etc but can't get it right What's the problem? Sorry for the Spanish
the code
https://i.sstatic.net/y6ogf.jpg
it prints this