Counting Techniques In Statistics