The size function returns the number of elements.
valarray<size_t> size() const;
The number of elements as a valarray is returned.