Revert "Changes to countPeaks module"

This reverts commit 3b297d060e6cad84e27a1817e6c1886b3afbae7e.