Since you said it's a one-time script, perl may be overkill for what can be done in one or two shell commands.
Create your table:
mysql -u [username] -e "use [database name];CREATE TABLE games (file v
+archar(30) primary key, name text, description text, counter int)"
Populate it with the data file:
mysql -u [username] -e"use [database name];LOAD DATA INFILE '../data/g
+ames/descriptions.txt' REPLACE INTO TABLE games FIELDS TERMINATED BY
+'\t' LINES TERMINATED BY '\n' (file, name, description, counter)"
Replace [ database name ] with the database you are using, and [ username ] with your mysql username.
What you are trying to acheive with $count appears to be handled automatically by the REPLACE part of the LOAD DATA command.