counters for api errors