Simplify algorithm in numberOfUniqueNumbers
Fix behavior when exception is thrown when 0 should be returned
Implement Task2