Multiple Questions

i have a restFull service which returns a json response like,

{"code":0,"cid":"##,.......,} the value of code value will different(0,211,223,...) depends on the return code returned from the server (not http return code)

how can i get the total number of code value for all users?
let's assume we have 3 users and 1 of the user has code 0, the others have code 11
i want to have 0:1 and 11:2 (code:#ofcode respectively)

how can i include those code return in the index.html
the graph which shows the internal code return

version gatling-2.2.4 

i tried
.check(jsonPath("$.code").count.saveAs("return_code")), but this only returns the count for each user 
what i want is the total count for each code.