ENH: Add 'count_unique', for creating contingency tables.

It needs more tests, and it needs to be added to the docs, but I'd like to see if there is any interest in adding this to numpy before doing more work.  You can interpret this function as a multi-argument generalization of `unique(a, return_counts=True)`.

I've kept the API simple; I'm sure there are many variations that could be useful.
the type should probably be `np.intp` a count cannot exceed the size of a pointer