There is an array in which a bunch of duplicate elements. I need to output the contents of a specific element of this array and how many such elements are in it (output a number).
Array example:
array = ["Bob", "Alex", "Bob", "John"] (type 2 bob etc.)