From comments i extracted that you are passing data Record by Record consuming JQuery.
let say your current method is like this
$.ajax({
type : xxx
url : xxx
dataType: xxx
.
.
.}).promise().done(function( response){
alert(response);
});
update it by writing
var globalTransmitCount = 0;
$.ajax({
type : xxx
url : xxx
dataType: xxx
.
.
.}).promise().done(function( response){
globalTransmitCount = globalTransmitCount + 1;
$(#mydiv).html(globalTransmitCount + " records has been transmitted");
}));