added function to count number of upper cases and lower cases