Powershell Select String Count Python Function