count number of combinations