Finding number of ways to choose r items from a set of n items