Here is an example
library(ggplot2)
ggplot(mtcars, aes(cyl)) +
geom_bar(fill = "black") +
geom_text(aes(label = stat(count)), stat = "count", vjust = -0.5)
Created on 2021-07-22 by the reprex package (v2.0.0)
If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.