We introduce the concepts of harmonic stability and harmonic index
for a complete minimal hypersurface in $R^{n+1}(n\leq3)$ and prove
that the hypersurface has only finitely many ends if its harmonic
index is finite. Furthermore, the number of ends is bounded from above
by 1 plus the harmonic index. Each end has a representation of
nonnegative harmonic function, and these functions form a partition of
unity. We also give an explicit estimate of the harmonic index for a
class of special minimal hypersurfaces, namely, minimal hypersurfaces
with finite total scalar curvature. It is shown that for such a
submanifold the space of bounded harmonic functions is exactly
generated by the representation functions of the ends.