Can you add some alerts and check once

Whether c.data.count is coming in c.server.update() function?

Also, in the html why are you enclosing the model html code inside script tag?

Mark the comment as helpful if it helps.