The first is to pass the output to the PowerShell measure-object cmdlet. Here it is in action, showing what it returned:
<code>PS C:\> </code><code>get-command | measure-object</code>
Count : 994<br>
Another way would be to just get the count property of the command. You enter the following command and it returns just the count property, which you can see below:
<code>PS C:\> (get-command).count</code>
Other options exist, such as using a custom variable incrementing, but the above two options are probably the easiest.