Java Count Number Of Occurrences In Array Python Initialize Variable To Null