My answer is always countertop first. In fact, a better answer would be countertop demolition first.
Many countertop edging (especially tile bullnose), cover certain portion of the cabinet. When the carpenters reface the cabinet, they can only reface what they can see. In other word, they cannot reface the portion of the cabinet that the countertop edging covers.
As a result, when the tile countertop was eventually torn, the raw edge exposed. There are still tricks to cover the old marks, such as installing a wood trim. However, it would not be the best way to showcase your spanking new granite, marble, quartz, or in this case onyx countertop.
The lesson learn is to always reface without the old countertop. If you can only afford one project at a time, change the countertop first.