To get a program to count colors, I would first define the function and name it colorCounting, I would pass it the string to count the words in. Inside the function I would create a variable to count and initialize it to zero. I would then create a list in an array of the colors I expect to count. I would then create a for loop that iterates thru the list of words, breaking them into individual words. I would then also loop thru the array of colors to get the individual color. Once I have that, I would compare the words and if the color is found in the list, it would increment the count. After finishing the loops, it would close out then print the count to the console.