test counting number of rows in sample