Hi PhAnatoE
Welcome to the Apple (user-to-user) Community.
Re: "What determines the number of frames in a live photo?"
and
"Does anyone know how the camera app decided which frames are usable and saved to the live photo?
Seems when Live Photos is turned on: Your iPhone just records what happens 1.5 seconds before and after you take a picture. That's it.
Re: "I can take the exact same photo and each one will have a different number of frames that make up it's .mov file"
Guessing the number of frames may depend on how much action takes place in those few seconds.
This may not be the answer you are looking for, yet we get the discussion under way at least. If others have more know-how, we'll see.
To view the individual frames in any Live Photo:
if you scroll to:
"How to change the key photo"
in Apple Support's article: Take and edit Live Photos - Apple Support
says:
Open the Live Photo and tap Edit.
Tap the Live Photos button 
Move the slider to change the frame. (You see all the frames)
(If you want you can:
Release your finger, then tap Make Key Photo.)
All the best :-)