Databricks Python Count Rows In Dataframe Sort