updated code to set row count for particular table