Reading words and counting their occurence in Java
I have one comment: 
Files.lines() method has the following comment in the JDK documentation:


  The returned stream encapsulates a Reader. If timely disposal of file
  system resources is required, the try-with-resources construct should
  be used to ensure that the stream's close method is invoked after the
  stream operations are completed.


in other words, in order to prevent resource leak, you need to construct the stream in a try-with-resources block 

try (Stream&lt;String&gt; linesStream = Files.lines(path)) {
    Map&lt;String, Long&gt; occ = linesStream
        .flatMap(line -&gt; Arrays.stream(line.split(delimRegex)))
        ....
}