/h/ sound changing in some Japanese counters


I just noticed that the quantifying words that have an initial sound as /h/
such as 本、匹、分

For example: 本 hon /h/ becomes /p/ : 1,6,8,10 /h/ becomes /b/ : 3,?? and ん
sound before /b/ becomes /m/ (is it assimilation?)

1 [一本]{いっぽん} ippon  
2 [二本]{にほん} nihon  
3 [三本]{さんぼん} sanbon  
4 [四本]{よんほん} yonhon  
5 [五本]{ごほん} gohon  
6 [六本]{ろっぽん} roppon  
7 [七本]{ななほん} nanahon  
8 [八本]{はっぽん} happon  
9 [九本]{きゅうほん} kyuuhon  
10 [十本]{じゅっぽん} juppon  
？？ [何本]{なんぼん} nanbon

some words have sound changing but other words, that have similar
characteristics, do not.

For instance "さんぼん" ; /h/---->/ b/  
But "よんほん"  
sound does not change

I would like to know that 1. "Is there phonological explanation that can
explain about changing of these sound?" 2. "why doesn't it occur in every
words which have similar characteristics?"

Thank you for taking your time to answer my question!




> _1. "Is there phonological explanation that can explain about changing of
> these sound?"_

If you are asking about the general rule, for _h_ → _b_ , it's 連濁 (rendaku)
"compound voicing", in case you don't know. There is [a great
answer](https://japanese.stackexchange.com/q/2526/7810) with [a dedicate
tag](https://japanese.stackexchange.com/questions/tagged/rendaku) on this
site, as well as [an independent article on
Wikipedia](https://en.wikipedia.org/wiki/Rendaku).

For _h_ → _p_ thing, it's called 促音便 (sokuonbin), or would be like "gemination
sandhi" in English. This is also a basic grammar of Japanese, [the
usage](https://japanese.stackexchange.com/q/40325/7810) and [the
history](https://japanese.stackexchange.com/q/60962/7810) already covered on
this site. Also [a small patch of explanation on
WP](https://en.wikipedia.org/wiki/Japanese_phonology#Gemination_2).

Edit: I've found [an answer conveniently explains
both](https://japanese.stackexchange.com/q/38728/7810).

> _2. "why doesn't it occur in every words which have similar
> characteristics?"_

While you can simply call it irregularity, but it does have something behind
the story.

If you take a look at a grammar book 『口語法』 compiled by a government commission
in 1916, they have listed
[漢語の数詞](http://dl.ndl.go.jp/info:ndljp/pid/1870063/29) (Sino-Japanese
numerals):

> 一 二 三 四 五 六 七 八 九 十...

They did not provide any pronunciation in this section, but [an interesting
note](http://dl.ndl.go.jp/info:ndljp/pid/926955/38) was put on this paragraph.

> 數を呼ぶに、次のように云ふことがある。聞きちがわせぬ爲である。  
>  _Sometimes numbers are pronounced as follows, in order to avoid
> mishearing._  
>  二百四十番【ふたひやくよんじうばん】 四百七十九圓【よんひやくななじうきうえん】

From above, we can assume that the typical pronunciation of numbers at that
time was:

> いち に さん し ご ろく しち はち く じゅう

And **よん** ・ **なな** ・ **きゅう** that we have today were merely telephone
pronunciation such as "tree", "fife", and "niner". Therefore, **よん** ほん was
originally the ad hoc replacement of **し** ほん, which would have no condition
to trigger rendaku.

Below are bonus tips about counter readings related to your question:

  * ふた for 2 is the only one that has not gained wide acceptance, but still used as telephone pronunciation among pilots, traders, military etc. alongside ひと for 1.
  * **はっ** ぽん and **はち** ほん are equally good. **なな** ほん can be read **しち** ほん as well. However, 7 has no *しっ- form, presumably because it'd be too confusing with 4 (し-) and 10 (じっ-; prescriptive form of じゅっ-).
  * Numbers end with ん (3, 何, 万...) that make the counter voiced, such as さん **ぼ** ん, are rather exceptional that only found with some counters established in old times. さんがい (< 階 floors), なんびき (< 匹 animals) and いちまんべん (< 遍 rounds; repeats) are only others I can recall. Otherwise unvoiced counters remain unvoiced: なんかい (< 回 times), なん **ぴ** ん (< 品 pieces of work) etc.
  * Foreign words as counters are never affected by rendaku, not even _h_ → _p_ : さんハロン (three furlongs), ろくヘクタール (six hectares), じゅっフォルダ (ten (computer) folders of...) etc.

