In a way each layer of abstraction could be seen as a virtual machine - a new set of “instructions” implemented via previous layer of instructions.
The analogy holds as long as we don’t cross layers, which is quite often true.
Therefore counting total number of layers is performance-wise quite similar to running this many layers of virtual machines. Of course, you need code for all of these translation layers.