How to count the frequency of a value in an array using NumPy?

Hey, I wanted a code for a function, it should work something like this:

>>> x = np.array([1,1,1,1,1,3,3,3,7,27,1,1])
>>> freq_count(x)
[(1, 7), (3, 3), (7, 1), (27, 1)]

Can anyone provide me with the code for freq_count(value)?