Count values for bubble sizes?

I made a simple bubble chart, I don’t have enough points to upload it here, so you can get it from this location instead.

What I would like to get is to have each bubble size proportional to the number of values appearing at that exact point. So it should look exactly the same as in the example, but without requiring me to add the C column (“Count”) or some kind of pivot table; it should just do it automatically. Notice that there are 2 points with X=2 and Y=4, so that bubble should be twice as big as the other ones. Is it possible to do that in LibreOffice?

Relative bubble sizes must be specified in a cell range. So keep the “Count” column, but calculate it automatically. To do this, enter =SUMPRODUCT(A$2:A$6=A2;B$2:B$6=B2) in C2 and then drag to fill down to C6.

After that, you may want to remove duplicate rows. This would give a chart with only one point in each location, rather than plotting multiple identical points in the same location.

Documentation: SUMPRODUCT.

Thanks, I was hoping for a more automatic way to do this, but I guess it’s not possible currently. The SUMPRODUCT tip is interesting though.