code: public static int getNumPoints(Geometry geometry) {
  		if (geometry == null) {
  			throw new IllegalArgumentException("Cannot get total number of points for null geometry.");
  		}
  		int count = 0;
  		if (geometry.getGeometries() != null) {
  			for (Geometry child : geometry.getGeometries()) {
  				count += getNumPoints(child);
  			}
  		}
  		if (geometry.getCoordinates() != null) {
  			count += geometry.getCoordinates().length;
  		}
  		return count;
  	}
docs: Return the total number of coordinates within the geometry. This add up all coordinates within the
  sub-geometries.
  
  @param geometry The geometry to calculate the total number of points for.
  @return The total number of coordinates within this geometry.