added scritp to count table rows.