@Shaull: Thanks for your answer! I'm new to StackExchange and don't know how to comment on an answer, so I choose to write an answer instead, in the hope that I may be forgiven.
Hmm, it seems to me that a shepard counting his sheep by writing a mark on a slip of paper for each sheep that he sees, or a prisoner counting the days he's been in jail by writing marks on the wall, are counting. Why wouldn't n marks on a slip of paper or on a wall count as a representation of the number n? Isn't that what is called a tally representation? AFAICS it is in no obvious way inferior to (say) a binary representation, except that it uses more space.
I suppose that for you then, "know" means that it has an internal representation of the count in the end. Then, of course, it is obvious that an FSA of FST cannot compute the length of an arbitrary string. But if we don't require knowledge in that sense, but demand only that the FSA or FST should be able to tell the result to an external observer, then it seems to me that presenting the count in a tally format should be ok.
Furthermore, if an FSA is equipped with both incremental input and output, then it should in principle be able to use its external environment as a read/write memory, and thus be as powerful as a Turing machine. Right?
Thanks for bringing up the case of comparing. Now, it appears to be the case that if we lift the requirement of an internal representation, and we only require that the machine is able to present the result to en external observer, then we could easily build an FSM that could produce a kind of graphical presentation of the outcome. Suppose the FSM, upon readins "aaaaaabbbbbb" wrote
then, since the bars are of the same length, the FSM has accepted the string "aaaaaabbbbbb". Two bars of the same length means "yes", different lengths means "no".
I guess I'm bending the rules, but that's what I want since I'm interested in the more or less implicit assumptions that are being made in the field of mathematical linguistics.