LDB:TDB backend - change counter variables to "unsigned" where appropriate