I can do it with classic boxplot. Here we use the built-in data: PlantGrown as example.
attach(PlantGrowth)
boxplot(weight~group,data=PlantGrowth,xaxt="n")
PlantGrowthSum=ddply(PlantGrowth,.(group),summarise,sum=length(weight))
> PlantGrowthSum
group sum
1 ctrl 10
2 trt1 10
3 trt2 10
axis(1,1:3,paste(PlantGrowthSum$group,"(",PlantGrowthSum$sum,")",sep=""))

Here is a question, how about ggplot2?
library(ggplot2)
bp <- ggplot(data=PlantGrowth, aes(x=group, y=weight, fill=group))
+ geom_boxplot()
+theme(axis.text.x=element_blank())
+theme(axis.text.x=1:3)
bp
But it failed. Any clues about which parameter should be set up?
As in this case x values are discrete, you should use
scale_x_discrete()to set labels for the x axis.More information and example about scales and other elements of ggplot2 plot can be found in ggplot2 documentation site.