Uses external bash command wc instead of reading all twice