Number of cycles in a homology basis Let $M$ be a 2-manifold (with or without borders). Here are the relevant definitions:


*

*A chain $\gamma$ on $M$ is an oriented 1-manifold embedded in $M$

*A cycle on $M$ is a chain without endpoints

*A chain $\gamma$ is called exact if there exist a sub-manifold $S$ of $M$ such that $\gamma = \partial S$

*Two cycles $\gamma_0$ and $\gamma_1$ are homological iff $\gamma_0 - \gamma_1$ is exact (i.e. $\gamma_0 \cup -\gamma_1$ is exact). We write $\gamma_0 \equiv_l \gamma_1$.

*$\{\gamma_i^H\}_{i=1, \cdots, n}$ is called a homology basis on $M$ if:
$\sum a_i \gamma_i^H \equiv_l \emptyset \iff a_1 = \cdots = a_n = 0$
$\forall \gamma \hspace{1em} \exists a \in \mathbb{Z}^n$ such that $\gamma \equiv_l \sum^n_{i=1}{a_i \gamma_i^H}$
Without citing any source, the paper N-Symmetry Direction Field Design states

An important result from manifold topology is that a homology basis on $M$ has $2g + b − 1$ basis vectors, where $g$ is the genus, and $b$ the number of borders of $M$.

If this is the case, then does that mean that the disk has no cycles in its homology basis? Is that equivalent to saying that every cycle is exact?  If so, then take a simple closed curve on the interior of the disk and give it the orientation such that the co-normal is pointing inward. How is this curve exact?
Also, what does this formula mean in the context of a sphere? $g = 0$, $b = 0$, clearly there are not -1 cycles in the homology basis.
Finally, what set of cycles would make up a homology basis for the torus? 2-torus?
 A: Yes, it's equivalent to saying that every closed 1-chain, or cycle, is exact.  However, there is indeed a problem with the definitions you were given.  Chains of any dimension should not only be thought of as oriented submanifolds: they should be the free group generated by such.  Your example of a simple closed curve $C$ is (-1) times the oriented boundary of a 2-chain represented by some smaller disk $D$; thus, because the boundary operator is linear, $C = \partial(-1\cdot D)$.
For the topological result you want, that is the classification theorem of closed surfaces together with an accounting of boundary components.  I would cite that as a combination of a deep theorem that says different ways of calculating integer homology of a surface give you the same result; and a simple method called simplicial homology, of constructing your surface out of polygons, and doing some oriented accounting of vertices, edges, and faces.  Hatcher's free Algebraic Topology book has great discussions of this, and I think the link I gave is pretty good although I only glanced over it quickly.
Finally, a basis on homology for a torus would be a meridian curve and a longitude curve; or any two simple closed curves that intersect transversely, in exactly one point.*  If you have a metric on the torus it is generally preferred to pick a pair of closed geodesics, and again require that their algebraic intersection number is $\pm 1$. The standard metric on a flat torus is to make it out of a square by identifying opposite parallel sides; then, the sides themselves form a homology basis, as do two lines (circles) of independent rational slope if they intersect in just one point.
For a 2-torus, you can create it as a connect-sum of two tori; pick a homology basis for each of those, make sure your disks that you use for connect-sum surgery do not intersect your chosen basis elements, and then you will have a homology basis for the 2-torus.  Not that it's always so easy, but for orientable surfaces it is (which is part of what the classification theorem tells us).
(*) Extra note, I really mean that the algebraic intersection of the two oriented curves is $\pm 1$: they may have more intersections, but loosely speaking it should be possible to deform the two curves smoothly so that the extra ones cancel out.  Intersection numbers are calculated by counting actual intersections with orientation.  Say for example you've got two closed oriented curves on an oriented surface embedded in $\mathbb R^3$: at a point of intersection of the two curves $C_1, C_2$, if the cross-product of the tangent vectors (always the one on $C_1$, then the one on $C_2$) points outward, count the intersection as $+1$, and if it points inward, count it as $-1$.  If it is $0$, the intersection is degenerate--not transverse--so usually one perturbs the curves until all intersections are transverse.  Intersection numbers are actually properties of a homology class, for the half-dimensional cycles and especially used for submanifolds, and often called the intersection product.  In the case of the torus, a basis for integer homology should be a pair of 1-cycles whose intersection product is $\pm 1$.
A: The formula only holds when there are boundary components, i.e., $b \geq 1$. It doesn't make sense for the sphere, as you remark, but it also isn't true for the torus ($g=1$, $b=0$, but the first homology group has rank $2$). See First homology of a compact connected surface with boundary for more details.
Regarding the disk: indeed, it has no nontrivial cycles. If you take any embedded circle in the disk, you may simply fill it in to get an embedded disk whose boundary is the original circle. Therefore every cycle in the disk is exact.
The first homology group of the torus has rank $2$; a basis consists of two loops going around the torus, one the "short way around" (a meridian) and one the "long way around" (a longitude).

The story for the closed orientable surface of genus $g$ (connected sum of $g$ tori) is similar: the basis consists of $2g$ cycles, namely a meridian and a longitude coming from each torus in the connected sum.
