[SPARK-4168][WebUI] web statges number should show correctly when stages are more than 1000

The number of completed stages and failed stages showed on webUI will always be less than 1000. This is really misleading when there are already thousands of stages completed or failed. The number should be correct even when only partial stages listed on the webUI (stage info will be removed if the number is too large).
Can you explain why it's not always equal in the comments (that we clear old entries automatically)? Also you can probably merge these two comments into 1 to avoid duplicating the comments.