Overview - Numbering shapes
An option exists that allows you to number the shapes in a Visio chart. This basically means that the starting shape is assigned the number 1. The next shape is assigned the number 2 etc.
Check the Number shapes option to turn this option on.
Note: It may be that the numbers of the shape are not sequential. You can solve this by renumbering the topics. See Sort and Renumber Topics for an explanation on how to do this.