The word סופר means both author and counter. "The authors" used to be writers of holy scrolls, where they would be copying over from an older source.
When done they would count the letters to make sure that the scroll is complete (this is still practiced nowadays, though done by computer). An incomplete scroll could not be used, even if missing one letter.
That's sort of a connection.
*בְּבַקָּשָה תַגִּיד אֶת זֶה בְאַנְגְּלִית
It’s a pun. סוֹפֵר is both and ‘count sing.pres.’ (dictionary form סָפַר) and ‘writer, author’. So the last line can mean either ‘they were both Jewish authors’ or ‘they both used to count Jews’.
Israelis often have a rather, uh, irreverent sense of humour when it comes to traumas.
The "writer has to count letters" doesn't sound very probable to me, sorry... Wiktionary tells a more convincing story: first there was ספר /sefer/, borrowed from Akkadian, in the sense of a physical written message. From there it was used in making lists, from there - counting, and from there - מספר /mispar/ - number.
Now, as to your motivation to learn how to derive words from roots - it doesn't work like this... you can analyze existing words in retrospect and see some common meanings to some templates, and to some roots, but it's quite fuzzy. In particular, the template miXXaX (for example מספר) has a number of examples, but not a very clear common meaning. If you go around putting random roots in random templates, you'll get mostly non-existing, unintelligible words... So while this system of roots and templates is very cool when you analyze words you know, it can't replace learning words one by one...