I am fairly new at programming and I was wondering how I could identify acronyms(combinations of characters with all capital letters such as OMG or WTF) in a text file. For example if the whole text was, "OMG I have no idea what I am doing right now, WTF!" The acronyms would be OMG and WTF, and the count would be 2. All other capitalized letters do not count since they do not have more than 1 consecutive capital letter. So basically if anyone could help me with identifying such acronyms and adding them to a count I would be very grateful!
P.S. Please show me the most basic way of doing this, such as using a for loop/other loops; since I do not have access to things such as arrays in the question!