Its always better to not to have column header as same as property name. Count is a property and not a method. Since you $Variable is a collection , it has a property called count.
@KvPrasoon,
I understand. But there is a lot of situation where you have to deal with it.
For example, I am pulling an inventory of Devops Udeploy using RESTAPI’s.
And API result contains header named Count, Length, Rank…
OR
Importing CSV which has header Count and manipulating it.
And in response to your reply, I need to use this count inside ForEach($item in $item.count){}
Note that this count in $item.count is the header.
Now, I may not use select object inside for each…
With all that said. I know there was a easier method something like $variable.‘Count’ or $variable.[count]… . which I am not able to recollect.