Powershell Group By Count Python String Functions