Very basic function : adding node, edge and counting