Assume a queue is represented by one immutable OCaml list and every update returns a new queue. Its caller repeatedly asks List.length items > 8. We are choosing between carrying an exact count and exposing a threshold query.
With (items, count), the pair pattern names two components. The invariant count = List.length items needs to survive every update. Enqueue adds one, a successful dequeue subtracts one, and dequeuing an empty queue leaves zero. Any constructor that accepts both components must preserve their relationship too.
For the existing question, List.compare_length_with items 8 > 0 expresses the threshold directly. The OCaml 5.4 documentation says this comparison may stop after at most the supplied number of iterations.
Would you add the cached field now, or keep this representation and give the threshold operation a small public name?