input: Write a function that takes an array of integers and returns the number of elements which has a sum of their digits greater than zero. If a number is negative, then its first signed digit will be negative, e.g. -123 has signed digits -1, 2, and 3.
  assert count_nums([]) == 0
  assert count_nums([-1, -2, 0]) == 0
  assert count_nums([1, 1, 2, -2, 3, 4, 5]) == 6
  assert count_nums([1, 6, 9, -6, 0, 1, 5]) == 5
  assert count_nums([1, 100, 98, -7, 1, -1]) == 4
  assert count_nums([12, 23, 34, -45, -56, 0]) == 5
  assert count_nums([-0, 1**0]) == 1
  assert count_nums([1]) == 1
  
output: def count_nums(arr):
      count = 0
      for num in arr:
          sum_digits = sum(int(digit) for digit in str(abs(num)))
          if num < 0:
              sum_digits -= 2 * int(str(abs(num))[0])
          if sum_digits > 0:
              count += 1
      return count