How about updating your process to count the lines in all the files and write a 'catalog' file into the tar file at the point you create the tar file. Then later, when you need this information, you can just go look at the catalog file inside the tarfile.
> I have 20,000 plus txt files inside the tar.
Are you saying that you no longer have the file system space to untar the files?
Have you actually tried to untar them and do your line count?
What is the real reason for "without having to untar them to temp directory". Is it lack of space, or some idea that you have that it will perform badly?