title: haskell, counting how many prime numbers are there in a list
body: <p>i m a newbie to haskell, currently i need  a function 'f' which, given two integers, returns the number of prime numbers in between them (i.e., greater than the first integer but smaller than the second).</p>
  
  <pre><code>Main&gt;  f 2 4
  1
  Main&gt; f 2 10
  3
  </code></pre>
  
  <p>here is my code so far, but it dosent work. any suggestions? thanks..</p>
  
  <pre><code>f :: Int -&gt; Int -&gt; Int
  f x y 
    | x &lt; y = length [ n | n &lt;- [x..y], y 'mod' n == 0] 
    | otherwise = 0
  </code></pre>