Scripting >> Powershell >>  How to count lines from the output

get-command *service | Measure-object -Lines