Question: How to count that how many times a number appears?

I got a set like this one:

g:={{3, 4, 5}, {5, 12, 13}, {6, 8, 10}, {7, 24, 25}, {8, 15, 17},

  {9, 12, 15}, {9, 40, 41}, {10, 24, 26}, {12, 16, 20},

  {12, 35, 37}, {14, 48, 50}, {15, 20, 25}, {15, 36, 39},

  {16, 30, 34}, {18, 24, 30}, {20, 21, 29}, {21, 28, 35},

  {24, 32, 40}, {27, 36, 45}}

And i want to count how many time a number apper in this set. Like an example:

3 appear 1

4 appear 1

5 appear 2.

Thank for your reading, :)

Sorry for my bad english :)

Please Wait...