The primary meaning of the verb 読む in ancient Japanese was to count.
よむ is primarily defined as 数える in 学研全訳古語辞典:
And according to 国語教育わたしの主張:
Then it began to mean to say out loud, to chant, because that's what people do when counting things. Then it began to mean to create (a haiku/waka) because a haiku was chanted or "sung". The modern primary meaning of 読む, to read (silently and understand what's written), is relatively new one.
Today, the meaning of to count is only found in a very few idioms such as 鯖を読む. As a native speaker, I of course know the metaphoric meaning of 鯖を読む, but I didn't know what 読む stands for in this idiom. Mackerels (鯖) are fish which are caught in bulk and spoil very quickly, and counting the number of mackerels was not what old people did seriously. That's why 鯖を読む means "presenting a wrong number".