Steps to reproduce:
1) Create template with discovery rule and host prototype.
2) Add macros to host prototype (on template).
3) Link template to host.
4) Navigate to Host prototypes (on host) Macros tab.
5) Click there Inherited and host prototype macros and then Host prototype macros
Correct macros amount displayed.