Count Max Bitwise-OR Subsets

Given an integer array nums, find the maximum possible bitwise OR value of a non-empty subset of nums, and return the number of different non-empty subsets that achieve that maximum bitwise OR. Subsets are different if they choose different indices.

Examples
Input: [3,1]
Output: 2
Hints

Count Max Bitwise-OR Subsets

Given an integer array `nums`, find the maximum possible bitwise OR value of a non-empty subset of `nums`, and return the number of different non-empty subsets that achieve that maximum bitwise OR. Subsets are different if they choose different indices.