Just put this right before the counter check.