This isn't a "proper" solution, but you can use it as a workaround for now.
On the data you suggested, the query:
select
myfield,
counts=count(myfield)
from
mytable
group by
myfield
order by
count(myfield) desc
will return the records:
myfield counts
7 4
8 3
9 3
The most popular number will always be the first row, so you only need to use _result($dbid,0,0) to get the result you desire.
Upsides to this approach: You can check for two or more "most popular numbers".
Downsides: You're getting lots of useless information.
If I find a way to restrict it to the single row, I'll post.
Please note - this works in MS SQL Server / Sybase. For other databases you may need to adjust the dialect.