You might think it's pretty simple to count the number of items you retrieve with a Get statement. You just do something like this, right?

(Get-CsVoicePolicy).Count

That command returns the number of voice policies you have defined in your Lync Server 2010 deployment.

Well, sometimes. Read this article to find out when this won't work and what to do about it.