cxx/core/message: allow checking the current number of frames already added
This simplifies things on the user side when adding a fixed number of frames per message. Instead of needing to keep count with a helper variable, we can just check how many frames have already been added.