This subject is so interesting!
Executive Summary: Plain clay tokens came into use at around 8,000 BC, then about 4,000 years later writing was invented. They are several shapes, each representing a type of commodity, and were stored baked in clay balls on which the contents had been impressed before encapsulating. Complex clay tokens were in use also, but they are at the much later time frame and only associated with the sumerian temple transactions. The theory is put forth that the plain tokens were for farm commodities, and the complex were for manufactured commodities. Sumerian math was astonishing in its advancement and its use of the base-60 system. There were different number systems for different "things", like sheep vs. grain volume vs. land area.
Here are just a couple of the links I've found that really explain this topic:
A top-level one with an unbelievably clear (but apparently biased) 10,000 year history of the region:
http://it.stlawu.edu/~dmelvill/mesomath/index.html
A page that has popped up repeatedly in my searches, not so much about the tokens or math, but the originis of the cunieform. Goes into the base-60 number system:
http://www.ancientscripts.com/sumerian.html
Look at this incredible and well-explained collection of tablets and bullas:
http://earth-history.com/Sumer/Clay-tablets.htm