   [graph protograph]
   [["/" :home #'home]
    ["/schema/protograph" :schema (fetch-schema protograph)]
+   ["/count" :count-all (count-all graph protograph)
+    [["/:label" :count-label (count-label graph)]]]
    ["/query/:label" :aggregate-query (aggregate-query graph protograph)]])
 
 (def parse-args

  (fn [request]
    (log/info "--> fetch schema")
    (#'fetch-schema-handler schema request)))

(defn aggregate-query
  [mongo protograph]

   :headers {"content-type" "application/json"}
   :body (json/generate-string schema)})

(defn count-all-handler
  [db protograph request]
  (let [labels (keys (:vertexes protograph))]
    {:status 200
     :headers {"content-type" "application/json"}
     :body (json/generate-string (mongo/counts db))}))

(defn count-label-handler
  [db request]
  (let [label (get-in request [:params :label])
        number (mongo/number db label)]
    {:status 200
     :headers {"content-type" "application/json"}
     :body (json/generate-string {label number})}))

(defn aggregate-query-handler
  [mongo protograph request]
  (let [query (mapv identity (read-json (:body request)))
