sympy/sympy — pull request #1698 by smichr (2012-12-19 21:21:16+00:00)
Title: Comb

To complement the generators of partitions, permutations and combinations which are multiset-aware, counting functions that are also multset-aware have been added, too. This bring together the variety of counting functions (like Sterling and Bell functions) to provide counts for the different combinatorical quantities:

```
>>> s = 'mississippi'
>>> nC(s,3)
15
>>> nP(s)
34650
>>> nP(s, 3) # permutations of length 3
53
>>> nT(s, 3) # partitions of length 3
609
>>> nT(s) # partitions of any length
6033
```