Total weight and number of items in assemblly drawing

Hi Experts

How can I link the total weight of an assembly and total number of parts to a drawing template as shown