title: Haskell 'count occurrences' function
body: <p>I implemented a <code>count</code> function in Haskell and I am wondering will this behave badly on large lists : </p>
  
  <pre><code>count   :: Eq a =&gt; a -&gt; [a] -&gt; Int
  count x =  length . filter (==x)
  </code></pre>
  
  <p>I believe the <code>length</code> function runs in linear time, is this correct?</p>
  
  <p>Edit: Refactor suggested by @Higemaru</p>