You should have gotten at most 2 from throwing 40 ender pearls. I recommend looking into the code or simply keep trying this on a creative world. If you do find an inconsistency in the code post it here.
Cannot reproduce. I've used 9 ender pearls and the 9th one spawned an endermite. Are you sure that there isn't any gamerule that prevents this, like doMobSpawning?
You should have gotten at most 2 from throwing 40 ender pearls. I recommend looking into the code or simply keep trying this on a creative world. If you do find an inconsistency in the code post it here.