provided the machine never turns of
string comes in...
parse string to analyze pattern...
compare to an array of strings that hold pattern
if !exists add it to array if exists ++ an int associated w/ that string
although if the program dies so does all the data... a better way would be to access a database and do a layout something like...
string pattern | occurances
select occurances where string pattern == inbound string
occurances ++, merge data back