Is hits.total limited by max_results_window?

Does the hits.total field returned for a query reflect the true total number of hits from the entire index, or is it restricted to max_result_window for the index? I'm using the JavaScript elasticsearch client.

hits.total is limited by terminate_after. max_result_window is just the biggest min-heap we allow ES to build per shard for collecting the actual results. hits.total is just a count of the hits so it shouldn't be limited.