Can someone help me with finding unique combinations. Something like:

12
1234

would have a total of 6 combinations, 12,13,14,21,23,24. And another:

67
12345

would have a total of 10 combinations, 61,62,63,64,65,71,72,73,74,75.

Thanks