Given an integer array nums, return an array counts where counts[i] is the number of smaller elements to the right of nums[i].
Example: For [5,2,6,1], output is [2,1,1,0]. To the right of there are smaller elements ( and ). To the right of there is smaller ().