tell me if it's stupid: how about just incrementing a counter that you'll store in DB?