<s>[INST] In this problem, we want to find the total number of distinct subsets that can be formed using the elements of a given array. For example, if the array is [1,2,3], the distinct subsets are: [], [1], [2], [1,2], [3], [1,3], [2,3], [1,2,3]. There are 8 distinct subsets. Write a code with an iterative approach to find the total number of distinct subsets.

```python
def find_subsets(nums):
    subsets = [[]]
    for num in nums:
        # add the current number to all previous subsets
        subsets += [prev + [num] for prev in subsets]
    return subsets

# test the function
nums = [1, 2, 3]
print(find_subsets(nums))
```

This code forms all subsets, but it doesn't count the subsets. Can you modify the code to count the subsets?[/INST]