We introduce the concept of boundary degeneracy of topologically ordered states on a compact orientable spatial manifold with boundaries, and emphasize that the boundary degeneracy provides richer information than the bulk degeneracy. Beyond the bulk-edge correspondence, we find the ground state degeneracy of the fully gapped edge modes depends on boundary gapping conditions. By associating different types of boundary gapping conditions as different ways of particle or quasiparticle condensations on the boundary, we develop an analytic theory of gapped boundaries. By Chern-Simons theory, this allows us to derive the ground state degeneracy formula in terms of boundary gapping conditions, which encodes more than the fusion algebra of fractionalized quasiparticles. We apply our theory to Kitaev's toric code and Levin-Wen string-net models. We predict that the Z2 toric code and Z2 double-semion model (more generally, the Zk gauge theory and the U(1)k×U(1)−k non-chiral fractional quantum Hall state at even integer k) can be numerically and experimentally distinguished, by measuring their boundary degeneracy on an annulus or a cylinder.