N = 5
5 has 2 factors 1 and 5
N = 25
25 has 3 factors 1, 5, 25
You don't need to read input or print anything. Your task is to complete the function countFactors() which takes an integer N as input parameters and returns an integer, total number factor of N.
Expected Time Complexity: O(sqrt(N)) Expected Space Complexity: O(1)