@app.errorhandler(405)
def method_not_allowed(e):
    global count_requests
    count_requests += 1
    return (jsonify({'error': 405}), 405)
@app.errorhandler(405)
def method_not_allowed(e):
    global count_requests
    count_requests += 1
    return (jsonify({'error': 405}), 405)