Powershell Group By Count Python Method Optional Variable