I found a partial solution to my problem:  
[Sequential Counter][1]  

The issue here is that this design uses items with droppers and hoppers, which makes it quite slow. It can also only count up. I would still love it if someone has a better plan.



  [1]: https://www.youtube.com/watch?v=yP99JuuaXQI