The present application relates to a method, system, device, and storage medium for counting the number of vertices and edges in a graph database, wherein the method includes: obtaining a task request for counting the number of vertices and edges in the graph space, and checking the preset preparation queue in the preparation queue according to the task request. Task, returns the ID of the preset preparatory task, writes the information record of the preset preparatory task in the system table of the preset preparatory task according to the ID of the preset preparatory task, and writes the graph in the system table of statistical information according to the ID of the graph space For spatial information records, the preset preparatory tasks are grouped according to the Leader node to which the graph partition belongs, and several preset execution tasks are obtained, and the preset execution tasks are run through the storage node. It solves the problem of how to reduce the waste of computing resources and improve the efficiency of real-time statistical data, and realizes an efficient parallel strategy for point-edge statistical tasks based on the job mechanism and task mechanism in Nebula Graph.