Map<String, Long> map = msgList.stream().collect(Collectors.groupingBy(Message::getFromAccount, Collectors.counting()));