The way I learned to define it was this:
The opening is the stage of the game in which players develop their pieces, get their king to safety, and attempt to control the center.
It switches to the middle game when players begin to attack each other, and defend.
The end game is when most of the pieces are off of the board. There is no definite number of pieces, but it's usually a safe bet to call it the endgame when each player has three pieces (knights, bishops, rooks, queens) or less.
Hope this helps!
Not sure if there is a definite answer for this but...
Was wondering if there is a definite time the "label" of the game switches from opening to middle game to end game. Whether it is a certain number of turns, or certain number of pieces taken etc etc
Just curious