Updated count_i function to disregard punctuation