The PSP scripts point to an HTML page for LOC counting. This page includes text fields for performing on-the-fly counts of code snippets. When those text fields are used, the LOC counter cannot guess the correct programming language unless the code snippet begins with a comment. If the code snippet does not start with a comment, the plain-text counter will be used, effectively causing all comments to be included in the LOC count.
Historically, the "LOC Counting Options" field near the top has provided a solution to this problem: users can type a flag such as "-lang=C" into the options box to force a given language. Unfortunately, that approach is fairly obscure, so most users do not discover this feature. As a result, on-the-fly LOC counts are sometimes incorrect and users do not understand why.
Fixed in version 2.4. The web-based LOC counter now includes a dedicated combo box for selecting the counting language:

Last edit: David Tuma 2017-08-06