getting table rowcounts