title: Counting characters in a specific text file
body: <p>I need to count the vocals, consonants and all other characters in a specific text file.</p>
  
  <p>I created a script that counts the vocals and consonants, but I can't figure out how to count the rest of the characters. </p>
  
  <p>The goal is to count ALL characters, even if they're from another language, like Icelandic characters and signs like comma, full stop and exclamation mark.</p>
  
  <p>Here's my current code:</p>
  
  <pre><code>Clear-Host
  $vocal = (Get-Content C:\Users\Administrator\Desktop\POWERSHELL\testfil.txt | Select-String -Pattern "a|e|i|o|u|æ|ø|å" -AllMatches).Matches.Count
  $vocal = (Get-Content C:\Users\Administrator\Desktop\POWERSHELL\testfil.txt | Select-String -Pattern "b|c|d|f|g|h|j|k|l|m|n|p|q|r|s|t|v|w|x|z" -AllMatches).Matches.Count
  $sign = $sign - $vocal - $consonant
  if ($consonant -ge $vocal -ge $sign) {
    "`nThere are $vocal vocals, $consonant consonants and $sign other signs in the chosen document.`n"
  } else {
      break
  }
  </code></pre>
  
  <p>I realize I need some way to count the total amount of characters, and then subtract the vocals and consonants (and spaces) to find the third number, but I can't figure it out.</p>