Check out example codes for "mysql count number of occurrences in a column". It will help you in understanding the concepts better.

Code Example 1

SELECT name,COUNT(*) 
FROM tablename 
GROUP BY name 
ORDER BY COUNT(*) DESC;

Learn ReactJs, React Native from akashmittal.com