what about a table to store the terms (maybe in some "normalized" way, like all lowercase, no accents, ...), and another table to store when those terms have been searched for ?
Normalization thing is to avoid "Word" and "word" being seen as two different terms in your could ; same for "éléphant" and "elephant", btw.
terms
- id
- word
terms_searched
#id _term
- time_search
Then, knowing the last searched terms, or the most searched terms, is just a matter of a simple SQL query, like
select id, term, count(*)
from terms
inner join terms_searched on terms_searched.id_term = terms.id
Maybe with a where clause to specify you only want recent searches to be taken into account ?
And if your tables become really big and the join in the query starts hurting performances, you can envisage denormalization, putting a "num_times_searched" in terms table, that sums up how many times a term has been searched for