Hello,
First BACKUP your database.
Go to phpmyadmin SQL tab and write "UPDATE PREFIXt_category SET pk_i_id = NEW_ID WHERE pk_i_id = OLD_ID", but untick "Enable foreign key checks".
Then again go to phpmyadmin SQL tab and write "UPDATE PREFIXt_item SET fk_i_category_id = NEW_ID WHERE pk_i_id = OLD_ID", but untick "Enable foreign key checks".
After that recount category stats in admin -> tools -> category stats.
Regards.