ZK counters for allocate IDs.
fixed things from code review
fixed things from code review
fixed things from code review
Merge pull request #527 from nlake44/db-perf2

ZK counters for allocate IDs.