Great example of count() and Group By functions in MySQL.
In this page we have discussed how to use MySQL COUNT() function with GROUP BY.
The following MySQL statement will show number of author for each country. The GROUP BY clause groups all records for each country and then COUNT() function in conjunction with GROUP BY counts the number of authors for each country.
– See more at: http://www.w3resource.com/mysql/aggregate-functions-and-grouping/aggregate-functions-and-grouping-count-with-group-by.php#sthash.MHVqWlWO.dpuf