title: Powershell search text for the value "1"
body: <p>Please could someone give me a hand I'm sort of new to powershell so your patience and knowledge would very much be appreciated. </p>
  
  <p>Here's the problem: I have txt file with numbers on each line.
  I need to Parse the txt file and find out how many times a specific value occurs
  so in the example below I need to search the file for the value then count the number of occurrences</p>
  
  <p>Example:</p>
  
  <pre><code>12,
  2,
  41,
  234,
  21,
  1,
  11,
  1,
  </code></pre>
  
  <p>This is what I have tried so far</p>
  
  <pre><code>$txt = get-content 'C:\numbers.txt'
  $search = $txt -match "1"
  $search.count 
  </code></pre>
  
  <p>But the results also find 12, 41, 21, 1, 11
  How do I find out how to find the count of just 1?</p>