if there is no lsearch feature for this i might suggest this way:
-check every lindex of your string, list, whatever
-if it cointains a number -> check for an array called myarray($number), if yes -> incr it by 1, if no -> create it and set it to 1
at the end you will have an array, and all his fields represent a number and how often they are used. then you just need a loop to sort (e.g. bubblesort) them and you're done
this is just one possible way, i'm sure there are easier ways (like with lsort -> stringlist and so on)