Position the countertop against the wall. The front edge of the counter needs to be parallel to the front of the cabinets.
Open the compass so the distance between the metal tip and the pencil are the same distance as the widest gap between the counter and the wall.
Tighten the compass thumbscrew so it doesn't alter its length.
Place the pencil on the countertop and the point at the wall and run the compass along the top of the counter. A line will appear showing the contour of the countertop.
Use a jigsaw for notches and other larger cutout areas. Sand the countertop to the line for a smooth finish.