Added test and implementation of charCounter with rspec