title: Count tabs per line and return the lines with too many tabs
body: <p>Looking for a PowerShell script that looks in a text file for rows that have too many (or too few) tabs.</p>
  
  <p>I found this PowerShell script that does exactly what I want (almost).</p>
  
  <p>This counts the number of tabs per row:</p>
  
  <pre><code>Get-Content test.txt | ForEach-Object { 
      ($_ | Select-String `t -all).matches | Measure-Object | Select-Object count
  }
  </code></pre>
  
  <p>Can someone extend/modify/re-write this to return only the rows (with row numbers) that have more than, or less than, X number of tabs per row?</p>