Steps:1. Carefully remove wooden trim without damaging it. Position a block of wood under the lip of the trim and pop the trim free by tapping on the block with a hammer (figure A).
2. Use a bar clamp to snug the wall against the counter, exposing the nail heads, then pry the nails out (figure B). Remove the bar clamp.
3. Wedge the block of wood between the counter and the wall to give you some room to work, then take a hand plane and scrape away old glue residue from the wall (figure C). Sand the edge of the counter as well. Clean up dirt and debris with a towel.
4. Apply a strong adhesive to the edge of the counter using a tongue depressor (figure D).
5. Remove the spacer block, line up the wall and counter, and clamp the pieces together using two bar clamps (figure E).
6. Mark the location for the screws so they go through the wall and into the counter. Use a combination square to make sure you don't wind up missing the edge of the counter. Pre-drill holes for the screws using countersinking bit.
7. Carefully insert screws through the retaining wall and into the side of the counter (figure F). Insert enough screws to hold the counter to the wall firmly.
8. Remove the clamps and reinstall the top molding. Drill pilot holes and secure trim with finishing nails. Sink the heads using a nail set.