Optimize rate of collection in counters Suppose you have $K$ counters. The value of these $K$ counters are all $0$. Every second, each counter has a $J$ chance of incrementing itself, up to a max value of $I$. Every second, you may choose to collect the values of all the counters. This resets all counters back to $0$ and prevents incrementation of counters for that second. Assume $K$ and $I$ are integers and $0 \le J \le 1$.
Find the optimal time between collections in terms of $J$, $K$, and $I$, such that the sum of the collected values is greatest.
For example, collecting every other second would not be ideal, as the incrementing time is essentially halved. Collecting too slowly would also not be ideal, as there is a chance that the max limit $I$ is reached and the counter attempts to increment itself but fails.
Feel free to add/remove tags.
 A: $K=1.$ $N_m=$ Binomial$(m,J)$ r.v.. The number on the counter after $m$ seconds is $min(I,N_m).$
If we collect the value on the counter after $m$ seconds, the expected value is:
$$E_m=E[min(I,N_m)]$$
If $m\le I $ then $N_m\le I$ and $E_m=E(N_m)=mJ.$ The expected number collected per second is $\frac{E_m}{m+1}=\frac{mJ}{m+1}.$ Since this increases in $m,$ it is never optimal to choose $m<I.$
Now for any $m,$ 
$(*)$ $ E_{m+1} = E_{m}+
\begin{cases}
0,  & \text{if } N_m \ge I  \\
J, & \text{if }  N_m \le I-1  \\
\end{cases}$
This is true since: If $N_m\ge I$ then the counter has reached its max value and increasing $m$ cannot increase the amount collected.  If $N_m\le I-1$ then the additional count collected is 0 or 1 with 1 occurring with probability $J.$ 
Now take the expected value of $(*).$ 
$(**)$ $ E_{m+1}=E_{m}+JP(N_m\le I-1).$
Notation: $F_m(I-1)=P(N_m\le I-1)=\sum_{s=0}^{I-1}{m \choose s}J^s(1-J)^{m-s}$ and $F_0(I-1)=1.$
Then for all $m:$
$E_{m+1}-E_{m}=JF_m(I-1)$ and $E_m=J\sum_{k=0}^{m-1}F_k(I-1), E_0=0.$
We want to choose $m$ to maximize $\frac{E_m}{m+1}=\frac{J\sum_{k=0}^{m-1}F_k(I-1)}{m+1}.$ 
$m$ is optimal if it satisfies:
$$\frac{\sum_{k=0}^{m-2}F_k(I-1)}{m} \le \frac{\sum_{k=0}^{m-1}F_k(I-1)}{m+1} \gt \frac{\sum_{k=0}^{m}F_k(I-1)}{m+2}$$
Examples:
\begin{matrix}
        I & J & m \\
        1 & 0.2 & 3 \\
        1 & 0.5 & 1 \text{ or } 2 \\
        11 & 0.2 & 32 \\
        11 & 0.5 & 16 \\
        22 & 0.2 & 70 \\
        22 & 0.5 & 33 \\
        44 & 0.2 & 154 \\
        44 & 0.5 & 70 \\
        \end{matrix}
A: I'll consider the case of $K=1$ counter here.  I believe Ragnar's comment is correct, that a strategy for one counter can be applied separately to more counters because of independence.
Let's say that after $m$ seconds, with no collection steps, the expected value of the counter is $E_m$.  Note that if $E_m\le I-1$, then $E_{m+1}=E_m+J$ (since there is a probability $J$ of gaining $1$ on the counter in the next second). Since $E_0=0$, it follows that the first values of $E_m$ will be $0, J, 2J,...$.
Now let $t$ be the first integer for which $E_t>I-1$ (thus $t=\lfloor\frac{I-1}{J}\rfloor+1$).  Then for $m = 1, 2, ..., t$, $E_m=mJ$. 
If we collect after $m$ seconds, $m=0,1,...,t$, we have our expected average score per second being $\frac{E_m}{m+1}=\frac{mJ}{m+1}$.  Since $J$ is fixed and $\frac{m}{m+1}$ is increasing, this quantity is increasing over the indicated range of values.  Thus we should wait at least enough seconds so that our expected score is greater than $I-1$.
It appears that often the best value for stopping will be this first value where the expectation of the collection is greater than $I-1$; however, in some (unusual?) cases such as $I=11$ and $J=0.13$, one may want to wait one more second.  I could not find any cases where one would wait more than one more second to collect, but was unable to prove it.
In any event, the optimal collecting time is often $t=\lfloor\frac{I-1}{J}\rfloor+1$, and generally not much more than that.
