title: mismatch type between method with a generic parameter
body: <p>I've got a weird problem that I can't seem to be able to solve. 
  I've written a class that contains a map of generic type T that extends comperable. (the keys of the map are of type T and the items Integers)
  one of the methods in the class has the following signature:</p>
  
  <pre><code>public int getCountForItem(T item)
  </code></pre>
  
  <p>I'm trying to implement a comperator for my class, that should use this function.
  which has the following method:</p>
  
  <pre><code>public int compare(T o1, T o2) 
  </code></pre>
  
  <p>However, when inside the method, I am trying to call getCountForItem, I get a compilation error, that there is a type mismatch.</p>
  
  <p>Any idea what I'm doing wrong here?</p>
  
  <p>edit: this is all in java</p>