Is this number per Tracked Entity Instance? I recommend checking the metadata packages for expert approaches. For example, Design - DHIS2 Documentation
Attributes are assigned for TEIs whereas data elements are assigned in Program Stages. Here’s where it’s explained in the docs, Programs - DHIS2 Documentation
Please feel free to post back to the community if you have more questions! Thanks!