Have you by any chance checked out the FAQ noted below under the section "Calculate / Counts"?
You might find some ideas or a solution by reading the various related threads.
Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
You might find some ideas or a solution by reading the various related threads.
Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/