# Problem with TeXcount related to file-including commands

I have found TeXcount extremely useful and, for all my needs so far, most accurate. Nonetheless, I have observed a strange behavior with TeXcount 3.0 (beta) when trying to make the script aware of files being included with the macro \InputIfFileExists.

Everything goes fine if I append the command directly in the script texcount.pl as follows:

my %TeXfileinclude=('\input'=>'input','\include'=>'texfile','\InputIfFileExists'=>'file');


But in order to not have this setting overwritten when upgrading to a next (or the same, but stable) version, I am using an options file. The line

%fileinclude \InputIfFileExists file


leads to some error when I run texcount. The error no longer appears and the scripting proceeds perfectly as soon as I comment that line with the hash sign, #, corresponding to Perl.

Is there something wrong with the way that I am proceeding?

-
I am having a similar problem - amongst my preamble I have defined a new column type \newcolumntype{C}[1]{>{\centering\arraybackslash$}p{#1}<{$}} . Texcount only works when this line is commented out, it appears that the hash sign # is causing the problem. Perhaps its simply that the hash symbol isn't taken into account when texcount is parsing the source code? – oLas Apr 29 '13 at 9:39