Is One Item in a folder equivalent to no Item in the folder?

by Feb 16, 2011

"Confused"Hello there,

My question may well be trivial to many people, but I need to be clear about this kind of basic issue.

Check out this command: 

(Get-ChildItem .).Count

My confusion?  When there is only one item in the folder, the command does not return any value. But when there are more than one items in the folder, the command returns the correct number of items.  Why is this so?