for i in defectdetails:
    if i[0] in date_wise_stats:
        date_wise_stats[i[0]] += 1
else:
    date_wise_stats[i[0]] = 1
if i[1] in priority_list:
    priority_list[i[1]] += 1
else:
    priority_list[i[1]] = 1
Python- Count number of occurrences of a date in a list