Setting up an atomic counter buffer