Tail-Recursion to get a Map of word counts
Yes, this is tail-recursive. Just annotate countWordsInFile with @tailrec and the compiler will check that for you.
Btw: why not name the method countWords? The Scanner is not limited to read from files.