If $X$ is a topological space, the group $\pi_2(X)$ is defined by the set of maps $S^2 \to X$ up to homotopy, where the sum of two maps is the natural map defined on the connected sum of the spheres.
Has been defined / studied the group defined as follows?
Consider the set of maps: $S_g \to X$, where $S_g$ is the closed surface of genus $g$, where $g$ varies in $\mathbb N$.
Given maps $f_1 \,: S_{g_1} \to X$ and $f_2 \,: S_{g_2} \to X$, we define the map $f_1 \# f_2 \,: S_{g_1} \# S_{g_2} \approx S_{g_1 + g_2} \to X$ in the obvious way (the map $f_1 \# f_2$ may be well defined only up to homotopy. Moreover, basepoints should be considered).
The identity of the group is the set of all maps $S_g \to X$ that are homotopically constant. Given $f \, : S_g \to X$, it is possible to define a map $f' \,: S_g \to X$ such that $f \# f'$ is homotopically constant (analogously as in the definition of the inverse in $\pi_2(X)$). Given maps $f_1 \, : S_{g_1} \to X$ and $f_2 \,: S_{g_2} \to X$, we say that $f_1 \sim f_2$ if $f_1 \# f_2$ is homotopically constant (i.e., it represents an element of the unity class of the group).
I think that a similar group could be defined in higher dimensions as well!
EDIT: as pointed out by Miller, the definition above is obviously wrong ($f'$ defined as above does not provide an inverse element). So I ask the related question:
Is it possible to savage the definition above (had corrected version of this "group" being studied?)
The correct version of the groups you are trying to define has already been defined and studied. The group we are speaking about are called $\textbf{bordism groups}$.
Let us restrict our attention to smooth manifolds, in the topological case you can give similar definitions but it is impossible to prove theorems I think.
Define $\Omega_2(X)$ as follows. Consider the set of pairs $(\Sigma, f)$ with $f: \Sigma \to X$ smooth map from a surface $\Sigma$ to $X$, and impose the equivalence relation $(\Sigma_0, f_0) \sim (\Sigma_1, f_1)$ if there exists a 3-manifold with boundary $Y$ and a smooth map $F:Y \to X$ such that $$\partial Y = \Sigma_0 \cup -\Sigma_1 \ \ \ \text{ and }\ \ \ F|_{\partial Y}= f_0 \cup f_1 \ .$$
We define the sum operation on $\Omega_2(X)$ by setting $$ (\Sigma_0, f_0) \# (\Sigma_1, f_1)= (\Sigma_0 \cup \Sigma_1, f_0 \cup f_1).$$
This is at the second bordism group of $X$. I let you guess how to define the higher groups $\Omega_n(X)$ and to prove that these groups satisfy large part of the basic properties of an homology theory. In fact, in some lucky cases you can also prove that $\Omega_n(X) \simeq H_n(X)$. For more about this, look at the last chapter of this book:
http://www.maths.ed.ac.uk/~aar/papers/diecktop.pdf
I would also like to remark that by introducing the possibility to have some singularities in the manifolds involved in this set up, you can define homology groups by using a this construction.