Rough up the surface of the melamine with a fine-grit sanding block. Melamine is very slick. You must mar the surface for the primer and paint to stick properly.
Apply a coat of melamine primer. Use a primer that is specifically made for melamine or plastic. Roll on a thin coat, and allow the primer to dry for four hours. If you can still see the melamine underneath the primer, apply a second coat and allow it to dry for another four hours.
Apply one coat of melamine paint. Roll on a thin coat of the desired paint color. Use a brush if necessary to go along the edges. Let the paint dry for four to six hours.
Examine the surface of the counter. Check for visible roller marks and primer bleed-through. If you see this, apply a second coat of paint.