People on this forum are not all familiar with biological jargon, so you can't expect everybody to know what a geneID is or to recognise the file format you are posting. Try to describe your problems in a way that everybody will udnerstand ('I have a text file with the following format and I want to count how many times the following text occurs..')
As said above, put code tags around the bits of your post where formatting should be preserved as you paste it:
< code >
Explore BioPerl and try to find the best module for your job by searching bioperl.org or join the bioperl mailing lists where you can ask people who know both Perl and biology.
In this case - and that is often the case - you might get away with a simply command line tool if you are on a UNIX based system (including Mac). For example: the 'grep' command can find a specific string in a file and, with the -c option, counts it for you, like so: