This isn't really checking "how big the stack" is, it's counting how many WT_REF entries there are?   The word "stack" pointed me in the wrong direction.