Counting in the dumbest possible way might actually be a smart way in few cases.
To count like this:
0. 0 (zero)
1. 01
2. 011
3. 0111
4. 01111
...
length=n+1 might seem horribly inefficient, but if the probability distribution has the shape f(n) = 1/(n+1)² and you would otherwise encode with fixed 8 bit, then it is more efficient by more than 1 bit per value. The 255 would only occur 1/256², but be 256 bit long. The zero on the other hand would make up 1/1.641 of all stored numbers.
Now if this seems like an extreme edge case to you then take it as an introductory example and consider counting more like usual:
0.0 (zero)
0.1
10.0
10.1
110.0
110.1
1110.0
1110.1
11110.0
11110.1
...
unlimited dynamic range in a limited amount of data given the case big changes almost never happen.
Or if you do not wish to reserve the possibility of counting to infinity:
00.0 (zero)
00.1
01.00
01.01
01.10
01.11
10.000
10.001
10.010
10.011
10.100
10.101
...
11.0000
11.0001
11.0010
11.0011
11.0100
...
11.1111 (30th and last combination, only an example)
In the last case the maximum length is limited to m+2^m-1+k. In this case I chose m=2 and k=1 making the zero m+k=3 bit long. To replace a 8 bit encoding you might chose m=3 k=0 counting from 000. to 111.1111111 yielding 1+2+4+8+16+32+64+128 combinations, just one short of 256.
You see there are many ways to count that you can fit to your data.
For what signals is this a good and simple way? For low noise, little high frequency content signals such as loss less audio and high resolution data logging.
For values that are symmetrically distributed around zero you would only store a unsigned differential, the sign (+/-) bit and probably chose an encoding that does not favor small numbers as heavily as the given examples.