title: Powershell Count not returning number of filtered objects
body: <p>I have a set of objects (from an import-csv command) I've grouped on one column. I'm filtering this data based on one of the other columns and trying to get a count.</p>
  
  <p>It works fine until there's a single record in the filtered group set. Then it returns nothing (from what I can tell).</p>
  
  <pre><code>function TestFun ( $data ) {
    $data | Group-Object GroupColumn | Sort-Object SortColumn | % {
      $currentObj = $_ | Select-Object -ExpandProperty Group
      $count1 = ($currentObj | Where-Object { $_.FilterColumn -le 2}).Count
      $count2 = ($currentObj | Where-Object { $_.FilterColumn -ge 2}).Count
  
    }
  }
  </code></pre>
  
  <p>That's essentially the code I'm working with, simplified. Like I said, if there's multiple rows ge and/or le 2, it works. If there's only one row, it returns nothing.</p>
  
  <p>I am grouping then expanding the results so that I can iterate through the grouped collection one result at a time.. if there's a better way to do that, I'm open to suggestions. :)</p>