Custom Alernatives to Measure-Object

PowerShell provides a built-in method for most objects to count the number of items in that object. Also, PowerShell comes with the Measure-Object commandlet. But, what if those don’t quite suit your needs and you want to be able to pipe an object to a single function to do the work for you? Read on to see a few alternatives to .Count and Measure-Object.