title: Powershell. count the number of duplicate entries in a file
body: <p>I have a text file with a list of IP addresses, and i need to count the number of times the same IP appears in the file.</p>
  
  <p>I've found lots of ways of removing duplicate entries, and how to count the number of lines, but nothing on how to counting duplicate entries.</p>
  
  <p>I haven't got much of a script yet, not anything worth posting, but if someone can point me in the right direction, that will be a start.</p>