You appear to want to count the number of tab-delimited fields in a file. To do this, you would have to split the input line on tabs and count them. awk can do this automatically, and it also has a special variable for the resulting number of fields, NF.
If you want to print all lines that has 996 fields (995 tabs):
awk -F '\t' 'NF == 996' <file
This is a shorthand way of writing
awk 'BEGIN { FS = "\t" } NF == 996 { print }' <file
where print means print $0, i.e. print the input record (line), and FS is the input field separator.
Whenever you find yourself extracting lines of text from a file and passing them to awk or sed or a similar tool in a loop, then there is always a more efficient way of doing the same operation. Note that the above commands only calls awk a single time, whereas your solution (had it passed the data correctly to awk) would have called awk for each and every line in the file.
awk. However the whole shell loop is superfluous - you can conditionally print lines with awk alone e.g.awk 'gsub(/\t/,"") == 995 {print}' 0101.tsvor (assuming you want to count tab separated fields) simplyawk -F'\t' 'NF == 996' 0101.tsv