Given a number, create a function which returns a new number based on the following rules:
The following is a working example:
digitCount(136116) ➞ 312332
// The number 1 appears thrice, so replace all 1s with 3s.
// The number 3 appears only once, so replace all 3s with 1s.
// The number 6 appears twice, so replace all 6s with 2s.
digitCount(221333) ➞ 221333
digitCount(136116) ➞ 312332
digitCount(2) ➞ 1
Each test will have a positive whole number in its parameter.