title: PowerShell - how to count the number of arguments
body: <p>I am writing a .ps1 PowerShell script, and I was wondering how I would find how many arguments the user passed. For example, I need my program to handle checking a string in multiple files. So the user should be able to type in </p>
  
  <p><code>./Script "a" ex1.txt</code> or </p>
  
  <p><code>./Script "a" ex1.txt ex2.txt</code> </p>
  
  <p>I know in Bash we can use <code>$#</code>, but how do I check in PowerShell?</p>