title: Get PSObject array size or count
body: <p>I create an array like this:</p>
  
  <pre><code>$Array = @()
  
  $Item = New-Object PSObject
  $Item | Add-Member -Type NoteProperty -Name item1 -Value test
  $Item | Add-Member -Type NoteProperty -Name item2 -Value test
  
  $Array += $Item
  </code></pre>
  
  <p>Now I want to add a check to determine if <code>$Item</code> is empty before adding it in <code>$Array</code>. How can I get the member count of <code>$Item</code> ?</p>
  
  <p>I tried stuff like :</p>
  
  <pre><code>$Item.count
  $Item.length
  @($Item).count
  ($Item | Measure).count
  ($Item | Get-Member).count
  $Item.psobject.members.count
  </code></pre>
  
  <p>But none of them gives me the actual member count.</p>