There are others on here who are more experienced than I, but on the surface it sounds like the framing for the counter was made with green wood. It is now drying out and causing shrinkage or has the appearance of pulling away from the wall.
Make sure that the gap is not caused by a sagging floor or a buckling wall, then try to move and re-attach the counter to the wall. A 1/4" is not a huge space so maybe an easier solution can be done. You could simply caulk the seam/crack as long as it's not caused by the floor moving or some other structural problem.
If that's too unsightly or the crack is too big for a rim of caulking, you could put up a splash board or some other decorative piece. Maybe frame the counter with a narrow band of wall tiles or some such. Just make sure that whatever you put up can move with the change of seasons, as it sounds as though there is enough shifting to break a permanently attached repair.