fix tx count on db insert