api request counting