RDD.count()[source]#

Return the number of elements in this RDD.

New in version 0.7.0.

Returns
int

the number of elements

Examples

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