Basic counting and balls and bins problems