A company counts as being at an all-time high when its high for the day reaches its highest price ever. A reading near zero doesn't necessarily mean a bear market. It can just mean the market has pulled back from a recent peak, which is normal even in an uptrend.
Same method as the all-time-high tab: a company counts as being at an all-time low when its low for the day reaches its lowest price ever.
The bars show the number of S&P 500 companies at a new all-time high minus the number at a new all-time low each day, a classic breadth measure. Positive and rising means strength is spreading. Negative means more companies are breaking down than breaking out, which can show up before the index itself turns. The line is the S&P 500 for context.