Is there a statistical test for comparing count/frequency of different groups (just one dimension)? This seems very simple question, but I could not get my head through it. The data is like below:
In the sample of 30 patients, patients can have four types of treatment. we want to know whether B type is the most preferred type. The research question is to find which treatment is preferred, and I do not have prior knowledge on that. 
From naked eyes, we can see that clearly. But is there a statistical test exists for that?
Type      Count
A           4
B          18
C           6
D           2

I am thinking, is doing Fisher Exact test on
Type      observed   assuming_everything_is_equal
A           4        30*0.25 = 7.5
B          18        7.5
C           6        7.5
D           2        7.5

Does it make sense? if not, what can I do? Or there is no such statistical test?
 A: "If one were preferred, which would it be?" is effectively a form of estimation problem. "Is it the case that they not all exactly equally preferred?" is a testing problem.
You also cannot use the data to choose a single group of which to ask "is this the most popular" and test only that as if you had not made that choice based on the same data you're testing on. (Properly accounting for making that data-based choice is effectively the same as just doing the omnibus test in the first place.)
You have a set of categories and (pace the issue above) you appear to want to test whether they are preferred with equal frequency.
Under the usual assumptions, this is then a multinomial sampling situation with a null hypothesis of equal probabilities to each category.
Common omnibus tests for this would include the chi-squared goodness of fit test, and the G-test for goodness of fit (a very similar test in terms of the same observed and expected counts, but with a somewhat different formula). Any number of other tests might be used, but I suggest you choose one of those two. The G-test often tends to be slightly more powerful on average, the Pearson chi-squared tends to be better known (and also more readily understood). In large samples they tend to give very similar results.
On the data you gave, the largest contribution to chi-squared comes from the highest category.
If you need to do some post-hoc tests (e.g. to see which groups seem to be different from the others), those can be done as well; I think there's some questions already on site for chi-squared post hoc tests.
