Correctly calculate insert count

Fixed a bug in the bulk insert handling that wasn't incrementing the inserts count correctly.