+#Metrics function
+
+@app.route('/counter/<string:countername>', methods=['GET'])
+def getCounter(countername):
+ if (countername == "num_instances"):
+ return str(len(policy_instances)),200
+ elif (countername == "num_types"):
+ return str(len(policy_types)),200
+ else:
+ return "Counter name: "+countername+" not found.",404
+
+