I was just wondering what would be the origin of the verb
обчёлся? Does it have something to do with
закончил считать? I don't think we use other forms of this verb, but in this idiom. How old is this expression?
I think the meaning is "not many, hardly any". I.e., if you count to two, you've counted them all (but not literally exactly two).
I've seen this written with a hyphen раз-два и обчёлся which subtly alters the "literal" interpretation to "one or two and that's about it". A hyphen between two successive numbers is used for estimates: e.g., "три-четыре" = "(about) three or four". And, naturally, the monosyllabic раз is often used in counting in place of один.
I'm not sure what you can say about the origin. Russian is very prolific with adding prepositions as prefixes to verbs to form new verbs, just like English is very prolific with using prepositions or adverbs after verbs ("give up", "look out", "get away with") to form phrasal verbs with new meanings. In both cases the new meaning is not always predictable.