xUnitCount () {
        if (this._unitCount === undefined) {
            if (this.isOrdinal()) {
                // In this case it number of items in domain
                this._unitCount = this.x().domain().length;
            } else {
                this._unitCount = this.xUnits()(this.x().domain()[0], this.x().domain()[1]);

                // Sometimes xUnits() may return an array while sometimes directly the count
                if (this._unitCount instanceof Array) {
                    this._unitCount = this._unitCount.length;
                }
            }
        }

        return this._unitCount;
    }
Returns the number of units displayed on the x axis. If the x axis is ordinal (`xUnits` is
`units.ordinal`), this is the number of items in the domain of the x scale. Otherwise, the
x unit count is calculated using the {@link CoordinateGridMixin#xUnits xUnits} function.
@returns {Number}