Let’s say I have a multidimensional array like this: How would I be able to count how many times the value “Thing1” occurs in the multidimensional array? Answer Try this : Output : It gives the occurrence of each value. ie : Thing1 occurs 2 times. EDIT : As per OP’s comment : “Which array do you mean resulting array?”