function getPathCount(pathSet) {
    if (pathSet.length === 0) {
        throw new Error("All paths must have length larger than zero.");
    }

    var numPaths = 1;

    for (var i = 0; i < pathSet.length; i++) {
        var segment = pathSet[i];

        if (Array.isArray(segment)) {

            var numKeys = 0;

            for (var j = 0; j < segment.length; j++) {
                var keySet = segment[j];

                numKeys += getRangeOrKeySize(keySet);
            }

            numPaths *= numKeys;

        } else {
            numPaths *= getRangeOrKeySize(segment);
        }
    }

    return numPaths;
}
Returns a count of the number of paths this pathset
represents.

For example, ["foo", {"from":0, "to":10}, "bar"],
would represent 11 paths (0 to 10, inclusive), and
["foo, ["baz", "boo"], "bar"] would represent 2 paths.

@function
@param {Object[]} pathSet the path set.

@return The number of paths this represents