Practice to count number of characters from a file