Hi Hari,
Not sure, where you might be going wrong. Check out this sample and see whether it helps? Plunker
Total rows count will be listed at the top, on click of 'Add Row' button it adds a row in table and updates the count at header level as well.
Regards,
Sai Vellanki.