The core insight: you need TWO conditions to be true. First, the score must be positive (>0). Second, the score must be at least the k-th contestant's score (>=threshold). Many people miss the positive requirement.
Even if someone ties the k-th place, they won't advance if that score is zero. You must check BOTH conditions using the AND operator. Store the k-th contestant's score as your threshold.
Then iterate through all scores, counting those that pass both checks.