One possibility is to add a Caption Box with the N statistic.
1) Plot your data as desired
2) Right Click on the Plot and select Add > Caption Box (you should see the Overall Mean for the entire data set)
3) Right Click again on the Plot, select Caption Box > Summary Statistics > N
4) 3) Right Click again on the Plot, select Caption Box > Per Factor
This will produce annotation at the top of the graph for each bar.
If that does not meet your criteria, you could create a new column with the n for each category, choose this column as Label, and then use it in Graph Builder as Label by Row
Depending on the organization of your table, the formula for n will be slightly different: a good place to start is "Col Number( :Y, :Category)"
Thierry R. Sornasse