The necessary and sufficient conditions for a given sequence of positive integers to be the degree sequence of -connected graphs and cactus graphs are proved respectively by S. L. Hakimi [5] and A. R. Rao [6]. In this note, we utilize these results to prove a formula for the functions and , the number of degree sequences with degree sum by -connected graphs and cactus graphs respectively. We give generating function proofs and elementary proofs of the formulas and .