Ведь счетчик уже увеличен с помощью incrementCount() synchronized (values) { incrementCount(); values[getCount()]++; }