public static <T> DataSet<LongValue> count(DataSet<T> input) {
		return input
			.map(new MapTo<>(new LongValue(1)))
				.returns(LONG_VALUE_TYPE_INFO)
				.name("Emit 1")
			.reduce(new AddLongValue())
				.name("Sum");
	}
public static < T > DataSet < LongValue > count ( DataSet < T > input ) { return input . map ( new MapTo < > ( new LongValue ( 1 ) ) ) . returns ( LONG_VALUE_TYPE_INFO ) . name ( "Emit 1" ) . reduce ( new AddLongValue ( ) ) . name ( "Sum" ) ; }
Count the number of elements in a DataSet.

@param input DataSet of elements to be counted
@param <T> element type
@return count