Can You please help me in this:

I need to count the number of each value in non fixed array
for example
3 times the word 'java' exist
4 times the word 'programming' exists and etc
Many Thanks