title: Regex to count characters
body: <p>I'm trying to verify the number of | in the line of a file. In this example it checks for exactly 5 bars.</p>
  
  <pre><code>^[\|]{5}$
  </code></pre>
  
  <p>This verifies 5, but doesn't take into account/ignore other characters.</p>
  
  <pre><code>Dice|Puppy|Button|Sunny|Music|Extra
  </code></pre>
  
  <p>What am I missing? Regex always throws me off.</p>