diff --git a/Common/DefaultOptions.h b/Common/DefaultOptions.h
index 4b6c9292e0ef6490efab08842b9aca764a9583ca..fbd4417fb0dcb8cd4915580c04c59c43fa3b19ff 100644
--- a/Common/DefaultOptions.h
+++ b/Common/DefaultOptions.h
@@ -423,6 +423,20 @@ StringXNumber MeshOptions_Number[] = {
     "Allow the generation of degenerated hexahedra or prisms during extrusion" },
   { F, "SaveAll" , opt_mesh_save_all , 0. , 
     "Ignore Physical definitions and save all elements" },
+  { F, "NbNodes" , opt_mesh_nb_nodes , 0. , 
+    "Number of nodes in the current mesh" },
+  { F, "NbTriangles" , opt_mesh_nb_triangles , 0. , 
+    "Number of triangles in the current mesh" },
+  { F, "NbQuadrangles" , opt_mesh_nb_quadrangles , 0. , 
+    "Number of quadrangles in the current mesh" },
+  { F, "NbTetrahedra" , opt_mesh_nb_tetrahedra , 0. , 
+    "Number of tetrahedra in the current mesh" },
+  { F, "NbHexahedra" , opt_mesh_nb_hexahedra , 0. , 
+    "Number of hexahedra in the current mesh" },
+  { F, "NbPrims" , opt_mesh_nb_prisms , 0. , 
+    "Number of prisms in the current mesh" },
+  { F, "NbPyramids" , opt_mesh_nb_pyramids , 0. , 
+    "Number of pyramids in the current mesh" },
   { 0, NULL , NULL , 0. , NULL }
 } ;
 
diff --git a/Common/Options.cpp b/Common/Options.cpp
index d03355e65ba91699237e56efefc4fa1e226c57f0..95f32fd55d867c5d2d906f40de0fa11467ea039b 100644
--- a/Common/Options.cpp
+++ b/Common/Options.cpp
@@ -1,4 +1,4 @@
-// $Id: Options.cpp,v 1.55 2001-11-05 08:37:43 geuzaine Exp $
+// $Id: Options.cpp,v 1.56 2001-11-07 08:04:30 geuzaine Exp $
 
 #include "Gmsh.h"
 #include "GmshUI.h"
@@ -1596,6 +1596,42 @@ double opt_mesh_color_carousel(OPT_ARGS_NUM){
 #endif
   return CTX.mesh.color_carousel;
 }
+double opt_mesh_nb_nodes(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[6]?s[6]:(s[5]?s[5]:s[4]);
+}
+double opt_mesh_nb_triangles(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[7]-s[8];
+}
+double opt_mesh_nb_quadrangles(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[8];
+}
+double opt_mesh_nb_tetrahedra(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[9];
+}
+double opt_mesh_nb_hexahedra(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[10];
+}
+double opt_mesh_nb_prisms(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[11];
+}
+double opt_mesh_nb_pyramids(OPT_ARGS_NUM){
+  double  s[50];
+  GetStatistics(s);
+  return s[12];
+}
+
 
 
 double opt_solver_getdp_popupmessages(OPT_ARGS_NUM){
diff --git a/Common/Options.h b/Common/Options.h
index eb9ba3b8307038ef3ddd2820deac4aecc9c3b069..eb6337a0aa85611c3c83d8a22adef53ee71dbd53 100644
--- a/Common/Options.h
+++ b/Common/Options.h
@@ -198,6 +198,13 @@ double opt_mesh_allow_degenerated_extrude(OPT_ARGS_NUM);
 double opt_mesh_save_all(OPT_ARGS_NUM);
 double opt_mesh_color_scheme(OPT_ARGS_NUM);
 double opt_mesh_color_carousel(OPT_ARGS_NUM);
+double opt_mesh_nb_nodes(OPT_ARGS_NUM);
+double opt_mesh_nb_triangles(OPT_ARGS_NUM);
+double opt_mesh_nb_quadrangles(OPT_ARGS_NUM);
+double opt_mesh_nb_tetrahedra(OPT_ARGS_NUM);
+double opt_mesh_nb_hexahedra(OPT_ARGS_NUM);
+double opt_mesh_nb_prisms(OPT_ARGS_NUM);
+double opt_mesh_nb_pyramids(OPT_ARGS_NUM);
 double opt_solver_getdp_popupmessages(OPT_ARGS_NUM);
 double opt_solver_getdp_mergeviews(OPT_ARGS_NUM);
 double opt_post_scales(OPT_ARGS_NUM);