LineCounter with some nio code