Implement the subsetsCountDistinct method that counts distinct subsets that can be formed from the values.

The input array nums contains size distinct values.

Your task is to return the number of different subsets that can be formed from the array. A subset may contain zero, one, many, or all elements.

For example, [1,2,3] has 8 subsets because each of the three elements can either be selected or skipped.

Example 1
Input:
nums (int[]) = [1,2,3]
size (int) = 3
Return:
(int) 8
Example 2
Input:
nums (int[]) = []
size (int) = 0
Return:
(int) 1
Example 3
Input:
nums (int[]) = [1,2]
size (int) = 2
Return:
(int) 4

Each element has two choices: include it in the subset or leave it out.

Since the choices are independent for every element, the total number of distinct subsets is 2^size. The empty subset is included in this count.

Calculate the power of two using a simple loop and return it.

Pseudocode:

function subsetsCountDistinct(nums, size):
    count = 1
    for i from 1 to size:
        count = count * 2
    return count
Run your code to see the result.