Python Pandas Count Number Of Occurrences In Java