  We use an algorithm by Ozsvath and Szabo to find closed formulae for the
ranks of the hat version of the Heegaard Floer homology groups for non-zero
Dehn surgeries on knots in the 3-sphere. As applications we provide new bounds
on the number of distinct ranks of the Heegaard Floer groups a Dehn surgery can
have. These in turn give a new lower bound on the rational Dehn surgery genus
of a rational homology 3-sphere. We also provide novel obstructions for a knot
to be a potential counterexample to the Cabling Conjecture.
