1.) Are you storing the "keywords" in a database or some other form?
If you are storing them in a database (which you probably should be) then it's just a matter of doing an easy "COUNT(*) FROM table WHERE ? GROUP BY question_id"
Now the "?" in the WHERE clause would be what you limit it to. Since you're searching the keywords, you can easily say:
COUNT(*) AS `cnt`
FROM `table`
WHERE `keyword` = '$something'
GROUP BY `question_id`
ORDER BY `cnt` DESC
Or for two-word phrases:
COUNT(*) AS `cnt`
FROM `table`
WHERE `keyword` = '$something $something2'
GROUP BY `question_id`
ORDER BY `cnt` DESC
And for three-word phrases:
COUNT(*) AS `cnt`
FROM `table`
WHERE `keyword` = '$something $something2 $something3'
GROUP BY `question_id`
ORDER BY `cnt` DESC
Then you can take all those results, and they'll be in most-popular to least-popular order. Then you can pick and choose which results you want to show. Or you can merge all 3 of them into one array and sort them. You'd want to watch out for duplicates that actually overwrite some other phrases (like if you had 2 phrases that equally scored a 25). So you might have to do a little bit of manual labor to get it working correctly.