reads files asynchronously with callback function, counts newlines by splitting