The ticket number is held by the database, so that there will never be two entries with the same primary id.
You will need to run the following sql queries
DELETE FROM ost_ticket;
DELETE FROM ost_ticket_attachment;
DELETE FROM ost_ticket_message;
DELETE FROM ost_ticket_note;
DELETE FROM ost_ticket_response;
ALTER TABLE ost_ticket AUTO_INCREMENT = 1;
I tested it and it set it back to 1, but no guarantees.