Not sure what you mean by position, but here's something that might help you:
scala> val test = List("How","long","are","we","dog","dog")
test: List[String] = List(How, long, are, we, dog, dog)
scala> test.groupBy(identity).mapValues(_.size).toSeq.sortBy(_._2)
res0: Seq[(String, Int)] = ArrayBuffer((are,1), (How,1), (long,1), (we,1), (dog,2))