Here's a solution using a regex and a hash table:
$ht=@{}
get-content filename.txt |
foreach {
$_ -match '^(\S+\s\S+)\s([^|]+)' > $null
$ht[$Matches[1]] += @($Matches[2])
}
$ht.keys | foreach {
[PSCustomObject]@{Name= $_;Count=($ht[$_] | Get-Unique).count}
} | ft -auto