Python Count Duplicate Rows In Dataframe Sort Columns In R