Drains through overflow

dishwasher drains through overflow and makes a mess on counter. why dont it drain through hose that goes to garbage disposal

[COLOR=“Blue”]dishwasher drains through overflow and makes a mess on counter.[/COLOR]
I am assuming you are referring to an air gap. This is not an overflow device.
What it does is allow air into the drain hose when the drain cycle stops. This prevents the drain hose from siphoning water back into the machine.

[COLOR=“Blue”]why dont it drain through hose that goes to garbage disposal[/COLOR]
It could be that there is a plug between the air gap and the house drain.
Remove the hose and check it.
It could be that the air gap needs replacing as normally it is supposed to seal the water in.

I am assuming that this installation used to run OK. If the garbage disposal is new you may have forgotten to knock out the plug on the disposal.

Here is a good dishwasher install sheet so you can see how it should be plumbed.
http://products.geappliances.com/MarketingObjectRetrieval/Dispatcher?RequestType=PDF&Name=31-30515.pdf