More consistent way of counting API calls