add count from counter method and add unit tests