title: Java Find duplicate lat/long for a List<LatLongObject> and keep the count for each entry
body: <p>I have a scenario wherein i have a List and i have to find the duplicate entries (the duplicate lat/long) in this and store the count for each entry.</p>
  
  <p>So lets say i have 6 enrties here</p>
  
  <pre><code>LatLongObject1  -- &gt;  "lat": 30.54203,"lon": -87.845879
  LatLongObject2  -- &gt;  "lat": 31.54203,"lon": -86.845879
  LatLongObject3  -- &gt;  "lat": 32.54203,"lon": -88.845879
  LatLongObject4  -- &gt;  "lat": 33.54203,"lon": -89.845879
  LatLongObject5  -- &gt;  "lat": 34.54203,"lon": -85.845879
  LatLongObject6  -- &gt;  "lat": 30.54203,"lon": -87.845879
  </code></pre>
  
  <p>So i can get something like:</p>
  
  <pre><code>LatLongObject1  -- &gt;  Count 2
  LatLongObject2  -- &gt;  Count 1
  LatLongObject3  -- &gt;  Count 1
  LatLongObject4  -- &gt;  Count 1
  LatLongObject5  -- &gt;  Count 1
  LatLongObject6  -- &gt;  Count 2
  </code></pre>
  
  <p>I know this can be achieved using two for loops but i dont want to do that as the time complexity would be too high. Any better suggestions please.</p>