title: Count the line # before blank line in PowerShell
body: <p>How do I get the number of lines before the blank line. For example:</p>
  
  <pre>
  This is a paragraph
  This is a paragraph
  This is a paragraph
  
  This is a paragraph
  This is a paragraph
  This is a paragraph
  This is a paragraph
  </pre>
  
  <p>The first set should count 3 lines and the second set counts 4 lines.
  I have used    <code>Get-Content .\testing.txt | Measure-Object -line</code>    which returns the total number of line but that's not what I wanted.</p>