Fix: training error should not affect classifier

Previously the `label_count` attribute was incremented before checking
if the document was a string, instead of the required type of list of
tokens.