how to get max number of redirects on Chrome? (before ERR_TOO_MANY_REDIRECTS )

It's 20, and it's actually specification-defined, so there is no configuration option. I found it in Chromium's source code at net/url_request/url_request.h:

// Max number of http redirects to follow. The Fetch spec says: "If
// request's redirect count is twenty, return a network error."
// https://fetch.spec.whatwg.org/#http-redirect-fetch
static constexpr int kMaxRedirects = 20;