How would you open a text file and then see how many instances of a number there are I have a file like this 1 2 2 2 2 2 1 1 1 2 2 Code (markup): Where I want to use out how many times the number 1 and 2 occurs.
Delete all 2s, all LFs, and all CRs. Then you will have a line like "11111111". Length of line is number or 1s in the line.