```scala
val tokenCounts = for ((token, tokens) <- recentTokens groupBy (_)) yield (token -> tokens.size)
```