Use group-object to categorize and count files by their type:
MSH D:\MshScripts> get-childitem | group-object {$_.Extension}