Add dimensions method to ParamSpec
diff --git a/metaopt/core/paramspec/paramspec.py b/metaopt/core/paramspec/paramspec.py
index cbd6c79..9c00787 100644
--- a/metaopt/core/paramspec/paramspec.py
+++ b/metaopt/core/paramspec/paramspec.py
@@ -59,6 +59,10 @@ class ParamSpec(object):

         return ordered_params

+    @property
+    def dimensions(self):
+        return len(self.params.values())
+
     def add_param(self, param):
         """Add a param to this param_spec object manually"""
         if param.name in self.params:
diff --git a/metaopt/tests/unit/core/param/paramspec.py b/metaopt/tests/unit/core/param/paramspec.py
index a4ba7b3..3e948b0 100644
--- a/metaopt/tests/unit/core/param/paramspec.py
+++ b/metaopt/tests/unit/core/param/paramspec.py
@@ -121,5 +121,15 @@ class TestParamspec(object):
         assert param_spec.params["b"].title == "β"
         assert param_spec.params["g"].title == "γ"

+    def test_dimensions_given_one_parameters(self):
+        param_spec = ParamSpec()
+
+        param_spec.int("a", interval=(1, 10))
+        param_spec.float("b", interval=(0, 1))
+        param_spec.bool("g")
+
+        assert param_spec.dimensions == 3
+
+
 if __name__ == '__main__':
     nose.runmodule()