The first calculation is an integer pair-count table. Frequencies weight each adjacent occurrence, so the displayed corpus determines every count and the merge rule has an exact source.
highlighted = computed this step
Counting adjacent pairs
A pair count is the sum over words of frequency times adjacent occurrences. Every count is an integer because the corpus frequencies and occurrences are integers. This is the central BPE mechanic: the current segmentation determines which adjacent pairs exist, then integer counting ranks them.
pair count=∑freq⋅adjacent occurrences
Round one counts
From the shown corpus, (h,u) has count 3, (u,g) has count 5, and (p,u) has count 2. The middle pair appears in both words, so its weighted total is larger than either word-specific starting pair.
(h,u)=3,(u,g)=5,(p,u)=2
Summary
The largest count is attached to (u,g). The next step applies the deterministic merge rule to that exact maximum. If counts tied, the stated tie-break would decide; here the maximum is strict.