How to get the number of vertices corresponding to each material of the static model

How to get the number of vertices corresponding to each material of the static model in C++