The following gives the counts, but does not identify the individual observations:
df <- data.frame(
gender = c("M", "M", "M", "F", "F", "M","F","F","F", "M"),
told = c("Y","N","Y","N","Y","N","Y","N","Y","N"),
has = c("Y", "Y", "Y", "Y", "Y", "N", "N","N","N","N"))
t <- table(df)
ftable(t)