STACK, Phi = number of objects.  Phi(D_0) = 0.
op              size  c_i   Phi before  Phi after   a_i
PUSH               1     1           0          1      2
PUSH               2     1           1          2      2
PUSH               3     1           2          3      2
PUSH               4     1           3          4      2
PUSH               5     1           4          5      2
POP                4     1           5          4      0
MULTIPOP 3         1     3           4          1      0
MULTIPOP 9         0     1           1          0      0
sum c_i = 10, sum a_i = 10, Phi(D_n) - Phi(D_0) = 0; identity holds: yes

COUNTER, Phi = number of 1 bits.  Phi(D_0) = 0.
  n  value  t_i (bits reset)  c_i   Phi after   a_i
  1      1              0      1          1      2
  2      2              1      2          1      2
  3      3              0      1          2      2
  4      4              2      3          1      2
  5      5              0      1          2      2
  6      6              1      2          2      2
  7      7              0      1          3      2
  8      8              3      4          1      2
  9      9              0      1          2      2
 10     10              1      2          2      2
 11     11              0      1          3      2
 12     12              2      3          2      2
 13     13              0      1          3      2
 14     14              1      2          3      2
 15     15              0      1          4      2
 16     16              4      5          1      2
sum c_i = 31, sum a_i = 32 (= 2n = 32), Phi(D_n) = 1
every a_i above is exactly 2, which is the bound proved in the text
