in reply to counting strings ending with a in dataset

No need to reinvent the wheel with a Perl program, grep can do the job:
grep -c 'A$' GSE_out