Recently I needed to find out if I had any files of a certain extension in a particular folder and if so how many. With Powershell this is no problem at all.
Say I was looking for a count of .ps1 files in the directory.
The @() makes the result go into an array object. This way no matter what you will get an accurate count without having to do a for loop on that directory.