The previous answer was in SQL code. If it helps, I have PHP code. It's simple but simplicity always worked. Basically, it queries from your database on each particular category, counts the elements in each query, and then gives you the count with the highest:
$result_first = mysql_query('SELECT FROM interests WHERE categoryID="firstsomething"');
$count_first = count (result_first);
$result_second = mysql_query('SELECT FROM interests WHERE categoryID="secondsomething"');
$count_second = count (result_second);
$result_third = mysql_query('SELECT * FROM interests WHERE categoryID="thirdsomething"');
$count_third = count (result_third);
$max_result = max($count_first, $count_second, $count_third);
If you have many categories, an iteration is best to use.