new createcounttables script for db