The short answer is yes.
The longer answer is you need to go outside of Inkscape if you want automation.
If you use Inkscape's own XML editor ( Edit -> XML Editor) you can see how Inkscape documents are structured.
If you've used paths or the circle tool to create an object they will show up as "svg:path id path12345", or "svg:rect id12345" if you've used the rectangle tool.
Unless you've manually named them, none of your objects will have the property "svg:inkscape label" set, or in other words, doing that programmatically, is essentially what you're wanting to do.
Choose a programming language that your are comfortable with and then have it loop over the .svg file looking for object definitions and setting (adding to the object properties to be saved in the SVG) the inkscape:label property as the value of an incrementing variable and output the result to a file.
Though if by label you mean make a text object and include that in a file, this wiki page shows how to use Python to make a "Hello World" Inkscape document us - creating a new layer then adding a text object which should give you pointers on how to create a text object, create the actual text message, position the resulting object, and then group it with the triangle it relates to.
Inkscape comes complete with several libraries written in python that allow you to script object handling amongst other things. And, if you find yourself wanting to repeat the same task on another project, you might want to consider making an Inkscape extension