Refactor out remaining calls to row_count