The root of the problem is the line shift in the optional argument (enclosed in
\documentclass. Because TeXcount by default fails to parse optional arguments containing line shifts, it fails to identify the document class (
scrbook), hence the error message.
TeXcount is a bit restrictive on what it accepts as optional arguments to avoid accidentally gobbling up large portions of text in case it should erroneously interpret an
[ after a macro as a macro option.
There are three solutions:
The first solution is to run TeXcount with the option
-relaxed which relaxes the constraint on macro options so that line shifts are allowed within them. This is arguably the best solution since it does not require modifying the TeX code, provided it does not cause problems by relaxing the parsing rules too much elsewhere.
The second is to remove the line shift from the first line so the whole
\documentclass is on one line. This allows TeXcount to parse the option as a macro option.
The third is simply to ignore the error. The only effect, as far as I can tell, is that TeXcount doesn't figure out which document class is being used. The only use of the document class is that TeXcount may import document class specific macro handling rules, but there aren't a lot of these implemented in TeXcount anyway and none for
scrbook as far as I can tell.