fix in countPmi