Fixed incorrect sorting and added SparkCountFeaturizerTest.