I'm sure there is a more elegant way to do this, but...
X <- floor(20*runif(700)) # generate fake data, although it will include 0's
values <- unique(X) # find possible values
counts <- rep(0,length(values)) # space to save counts
for (i in seq_along(values)){
counts[i] <- sum(X == values[i]) # take advantage that TRUE adds as 1.0
}