Use the following QGIS expression on the polygon layer to get the number of features in layer Points'Points' with the value of the field called attribute"attribute" = A:
array_length (overlay_contains ('Points', $id, filter:=attribute='A')) Label generated by concatenating the above expression three times for A, B and C:
