fully adding in api_count to front controller