using object to count letters