function getNumCells(res) {
    validateRes(res);
    const countPtr = C._malloc(SZ_INT64);
    try {
        // Get number as a long value
        throwIfError(H3.getNumCells(res, countPtr));
        return readInt64AsDoubleFromPointer(countPtr);
    } finally {
        C._free(countPtr);
    }
}
The total count of hexagons in the world at a given resolution. Note that above
resolution 8 the exact count cannot be represented in a JavaScript 32-bit number,
so consumers should use caution when applying further operations to the output.
@static
@param  {number} res  Hexagon resolution
@return {number}      Count
@throws {H3Error}     If the resolution is invalid