title: Count in Multiset
body: <p>I have been using the C++ STL for a while but never really got around to using multisets (or multimaps). I have a question based on counting the number of elements with the same key. For eg.
  Here is an unordered_multiset {0, 2, 5, 1, 1, 2, 7, 5}</p>
  
  <p>If I say, count(5), it should return 2. There are two ways to achieve that using the C++11 standards of unordered_multiset.
  1) <a href="http://www.cplusplus.com/reference/unordered_set/unordered_multiset/count/" rel="nofollow">count</a>
  2) <a href="http://www.cplusplus.com/reference/unordered_set/unordered_multiset/equal_range/" rel="nofollow">equal_range</a> and then subtracting the resulting iterators.</p>
  
  <p>1) is said to take linear time in number of occurrences but 2) is constant time. Why is that?</p>