Add stat to count number of times we reach queue_ref maximum. #1230