Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a 0-indexed integer array nums containing n distinct positive integers. A permutation of nums is called special if:

For all indexes 0 <= i < n - 1, either nums[i] % nums[i+1] == 0 or nums[i+1] % nums[i] == 0.

Return the total number of special permutations. As the answer could be large, return it modulo 109 + 7.
 
Please complete the following python code precisely:
```python
class Solution:
    def specialPerm(self, nums: List[int]) -> int:
```