generating simple stats (count from main tables)