It's easy as just remembering the ideal meal timings:
Breakfast at 7:00 am Lunch at 12 Dinner at 5:00 pm
Now to remember the type names :
7- Cervical - I usually have cereals for breakfast 12 - Thoracic - We have the breakfast and dinner connection covered so this the only one left. Hence not new conection required 5 - Lumbar - I slumber in bed after dinner
Combining the above two tricks you can easly remember the Spine consists of :
7 cervical vertebrae, 12 thoracic vertebrae, 5 lumbar vertebrae.
Ref: https://www.medicalmnemonics.info/index.php/13/how-to-remember-the-types-and-number-of-vertebrae-in-spine