As per @bparker06's recommendation. First element of the enum is forced to be zero, so we can add a tail to the enum that we can use to query its max length.