fix row_count method