Optimization of API Usage Count