Error when creating ggplot - Titanic: Machine Learning from Disaster

#artificialintelligence 

Does anyone know why I get this error when creating the ggplot for the train data set? Perhaps you want stat "count"?