add count variable to count the node number;