Count-frequency Implemented