The count variable is computed by the bin stat. SO you want to use
that statistic with a text geom like this:
library(ggplot2)
ggplot(iris, aes(x = Petal.Width)) +
geom_histogram() +
stat_bin(geom = "text", aes(label = stat(count)))
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
If you just want to show the max count, you could use something like this,
ggplot(iris, aes(x = Petal.Width)) +
geom_histogram() +
stat_bin(geom = "text",
aes(label = stat(ifelse(count == max(count), count, NA))))
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#> Warning: Removed 29 rows containing missing values (geom_text).

Created on 2018-09-23 by the reprex package (v0.2.0).