title: Getting counts from geom_density()
body: <p>I have a series of numbers:</p>
  <pre><code>tmp&lt;- c(round(seq(0, 12000, ((12000 - 0) / round(1500 * .05)))), 
                   round(seq(12000, 18900, ((18900 - 12000) / round(1500 * .1)))),
                   round(seq(18900, 23300, ((23300 - 18900) / round(1500 * .1)))),
                   round(seq(23300, 28100, ((28100 - 23300) / round(1500 * .1)))),
                   round(seq(28100, 33500, ((33500 - 28100) / round(1500 * .1)))),
                   round(seq(33500, 40000, ((40000 - 33500) / round(1500 * .1)))),
                   round(seq(40000, 47700, ((47700 - 40000) / round(1500 * .1)))),
                   round(seq(47700, 56500, ((56500 - 47700) / round(1500 * .1)))),
                   round(seq(56500, 68300, ((68300 - 56500) / round(1500 * .1)))),
                   round(seq(68300, 94200, ((94200 - 68300) / round(1500 * .1)))),
                   round(seq(94200, 200000, ((200000 - 94200) / round(1500 * .05)))))
  </code></pre>
  <p>Now I can use geom_density to get the shape of the distribution. How do I get the approximate count of the amount of tmp between two specific values of tmp, based on that density shape?</p>
  <p>So for example I could count the amount of values in tmp between 10050 and 10100, based on the actual series. But I would like to count the amount of values based on the smoothed histogram (the density), which is not as linear as the actual series.</p>