I did it a bit. Instead of the complicated IF conditions, I simply restart the counter to zero in each pass and let it count again. She goes through the loop the same way. Another problem was that the plus counter reacted too quickly. So I solved it by removing the K& pointer that references _KEYDOWN as soon as it responds. It's probably not the cleanest solution, but it works.
CONST YVel = 5, Hscreen = 400, Wscreen = 600, Rball = 10, MaxBall = 10
CONST Blu = _RGB32(0, 0, 255)
DIM Yball(1 TO MaxBall) AS INTEGER, A AS LONG, W AS INTEGER, CountBall AS INTEGER
A = _NEWIMAGE(Wscreen, Hscreen, 32)
IF A < -2 THEN SCREEN A ELSE PRINT "Error in Screen setup"
DO
CLS
LOCATE 1, 1: PRINT " press Space to shoot, Esc to quit Countball="; CountBall
PRINT " to test the issue press space while balls arrive to the top of screen"
CountBall = 0
FOR W = 1 TO MaxBall
IF Yball(W) > 1 THEN
CIRCLE (200, Yball(W)), Rball, Blu
PAINT STEP(0, 0), Blu, Blu
Yball(W) = Yball(W) - YVel
END IF
IF Yball(W) > 0 THEN CountBall = CountBall + 1
NEXT
k& = _KEYDOWN(32)
WHILE k&
IF CountBall < MaxBall THEN
CountBall = CountBall + 1
Yball(CountBall) = (Hscreen - (2 * Rball))
END IF
k& = 0
WEND
_LIMIT 50
LOOP UNTIL _KEYDOWN(27)
END