title: How to sum up votes of the songs with Collectors.summarizingInt and flatMap operators usage
body: <p>Let's say that I have classes that illustrate the problem of songs and votes voted for. </p>
  
  <p>User.java</p>
  
  <pre><code>@EqualsAndHashCode
  @Setter
  @AllArgsConstructor
  @NoArgsConstructor
  @Builder
  @Document(collection = "users")
  public class User {
  
    @Id private String id;
  
    private String username;
  
    private String email;
  
    private Integer age;
  
    private String password;
  
    @DBRef(db = "interview", lazy = true)
    @EqualsAndHashCode.Exclude
    @ToString.Exclude
    private Set&lt;Song&gt; songs;
  }
  </code></pre>
  
  <p>Song.java</p>
  
  <pre><code>@Data
  @AllArgsConstructor
  @NoArgsConstructor
  @Builder
  public class Song {
  
    @Id private String id;
  
    private String title;
  
    private String author;
  
    private String songGenre;
  
    Set&lt;Vote&gt; votesOfSong;
  }
  </code></pre>
  
  <p>Vote.java</p>
  
  <pre><code>@Builder
  @AllArgsConstructor
  @NoArgsConstructor
  @Document(collection = "votes")
  @Getter
  public class Vote {
  
    @Id private String id;
  
    private User user;
  
    private Song song;
  
    private VoteKind voteKind;
  
    @Default private LocalDateTime dateOfVote = LocalDateTime.now();
  }
  </code></pre>
  
  <p>and </p>
  
  <p>VoteKind.java</p>
  
  <pre><code>@RequiredArgsConstructor
  @Getter
  public enum VoteKind {
    LIKE(1),
    DISLIKE(-1);
  
    private final Integer voteValue;
  }
  </code></pre>
  
  <p>I want to create a <code>Flux</code> method which will find x of the highest-rated songs overall. </p>
  
  <p>So far I have not completed method: </p>
  
  <pre><code>public Flux&lt;Vote&gt; findHighestRatedSongs(int numberOfTopSongs) {
  
      return songRepository.findAll()
                           .limitRate(numberOfTopSongs)
                           .collect(Collectors.summarizingInt(value -&gt; value.getVotesOfSong()
       .stream()
       .flatMap(vote -&gt; vote.getVoteKind()
                            .getVoteValue(), ...missing expression))))
  }
  </code></pre>
  
  <p>As far as I understand I should use <code>toMap</code> method like: </p>
  
  <pre><code>Mono&lt;Map&lt;Set&lt;Vote&gt;, Song&gt;&gt; collect = songRepository.findAll()
          .collect(Collectors.toMap(Song::getVotesOfSong, Function.identity())); 
  </code></pre>
  
  <p>after all flat <code>getVotesOfSong</code> with <code>flatMap</code> operator to <code>VoteKinds</code> and at the end<code>reduce</code> result by summing likes and dislikes but I have a problem with final syntax which make me stuck. 
  All I want to return is <code>Flux&lt;Map&lt;String, Integer&gt;&gt;</code> which will match <code>SongTitle</code> and a number of votes for a particular song. </p>
  
  <p>I will be grateful for suggestions on how to reach a desirable goal. </p>