title: Combining map and length in Haskell
body: <p>I have two problems both of them with using map and length
  The first one should give me back the word count but instead it only count the elements in the list.</p>
  
  <pre><code>countWords :: [String]-&gt; Int
  countWords xs = length (map (words) xs)
  
  countWords ["asd  qwe", "-- Foo", "", "\thello world "] =&gt; 4--instead it have six words
  </code></pre>
  
  <p>The second is trickier because it should give back one int for the whole list. I can only count the characters of the individual elements, not the whole.</p>
  
  <pre><code>countChars :: [String]-&gt; [Int] --it should be Int
  countChars xs = map (\w -&gt; length (w)) xs 
  
  countChars ["asd  qwe", "-- Foo", "", "\thello world "] =&gt; [8,6,0,13]--it should give back the sum of this list which is 27
  </code></pre>