Counter logic buggy, but close to resolution