Hi - that information isn't currently available in expressions, nor in a built in Macro. You can hack it a bit by creating a macro that counts segments using geometry based on the size of the segment you plan to use in the final scene. Please take a look at the attached and let me know if it's of any help. It can probably be adapted for other uses.
Cheers,
Paul