pyspark.RDD.count

RDD.count() → int[source]

Return the number of elements in this RDD.

Examples

>>> sc.parallelize([2, 3, 4]).count()
3