added conditional to ignore white space

does not include white space in character count