title: how to find length of RDD in Spark
body: <p>How can i find the length of the below RDD?</p>
  
  <pre><code>var mark = sc.parallelize(List(1,2,3,4,5,6))
  
  scala&gt; mark.map(l =&gt; l.length).collect
  &lt;console&gt;:27: error: value length is not a member of Int
     mark.map(l =&gt; l.length).collect
  </code></pre>