Short answer:
A) No, there is not a more reliable way to guesstimate how long the story will end up.
A good beginning though is to learn proper spec script format, write it out, and see if it's under 90 pages or over 110/120. (Shorter is better than longer.)
Short answer:
B) When you've studied (not the same as "appreciated") enough movies to know what scenes are filler and what are embellishments.
First - Tell the story you've got to tell.
No, wait. First, skip the 40-50 scenes rubbish. Just delete that from memory. Boop! Gone.
THEN - Tell the story you've got to tell - in spec screenplay format.
Third - is it short of 90pages? Then you gotta fill it up some more. Or, is it long of 110 pages? Then you gotta pare down the (likely descriptive action and banal dialog) blabbity-blab.
(Everyone wants to f#cking write casual conversation like Quentin-f#cking-Tarrantino.
)
Most folks come up short of 90 pages.
Understand how some film stories make attaining a relatively simple MacGuffin a ten-scene PITA just as time filler.
Some add in a tangent story that will collide and mingle with the primary story.
But you gotta quit looking at scenes as like money for a ferry ride.
"Oh! Oh! The ferry ride is 40 dollars/pounds/euros/rupes/pesos/denars/groats/whatever - AND I HAVE 40!"
Won't work that way.
You gotta look at the story as a funtional organism to assemble.
Gotta have bones, muscle, nervous system, respiratory, digestive, and other systems, gotta have skin, an environment, food source, cultural values, etc.
Do you build a mouse or a moose?