Remove the table top from the table. Discard the legs and other parts, or save for a different project. You want to choose a table that has a thick, solid wood top. Alternatively, you may purchase a piece of butcher block from the lumberyard and have it cut to 20 inches deep and no more than 30 inches long.
Hold the yardstick horizontally on the wall where you want to place your counter. A standard countertop is 36 inches from the ground. Use a level to ensure that you have it perfectly straight and then a pencil to draw a line 30 inches along its length where you will hang the counter. Mark two additional spots, 6 inches in from each side.
Use self-drilling anchors to attach the folding shelf brackets where you have marked, 6 inches in from each end of the 30-inch line.
Lay the table top over the brackets. Use a drill to attach the brackets to the table top. The counter will fold down flat against the wall when not in use, and the brackets will lock open for use.