Count newlines (sync&async), list files with RegExp