You really should cast this in some biological context to keep it relevant in this forum, but this is a problem I often encounter in terms of counting gene ids etc., and one solution would be to use the table function. Assuming the structure of your second data frame:
table(Y$List1)
would return the frequency count of elements the column called "List1". I don't really understand the purpose of your first, one-column data frame, but if the purpose was to narrow the scope of a second data frame (Y), you could do the following:
Y <- Y[Y$List1 %in% X$List1,]
table(Y$List1)
The first step uses the %in% operator to return a boolean vector reflecting if the elements of one thing are found in the other. This reduces your Y data frame to just the things found in X. Then you count the frequency of things in Y. The advantage of %in% over match() is that match() would find only the first occurence.
Posted on StackOverflow: Compare occurrences between 2 dataframes in R