As I said the refill threshold refers to the number of cannonballs left in the cannon, so if you want to refill after 20-29 cannonballs have been fired you should set it to 1 | 10 lower and upper values.
Im honestly a bit confused by the fact that you cant figure it out since there are only 2 possible ways these numbers could work, either it refers to the numbers of cannonballs left in the cannon or the number of cannonballs you already shot. I think thats fairly easy to understand, but I have already added an additional explanation to the main post after your last comment.
Just keep in mind its obviously not realistically possible to make the cannon constantly refill at 29 cannonballs because of how the game works. Every action is delayed by 1 tick minimum and your cannon usually shoots bursts of multiple shots.