Simplified to just count the number of lines in rdd.