depending on which platform you're using, you might have access to either "long integers" or "double integers" ...
this approach would allow you to make use of 32-bit math - and let you easily count all the way up to 2,147,483,647 (over two billion) with no loss of resolution ...