Hi i was wondering if there was a method to count the number of times a certain word is encounter in a data file. For example, if i had the following data file
weight
min
max
mean weight
min
max
alpha
slope weight
min
max
sigma weight
so in this data file there is 4 lines that read "weight". How can i save this value 4 in a variable?