Say that I have a table like this:
local table = {"1", "1", "2", "3", "4"}
for i,v in pairs(table) do
print(v)
end
How would I go about creating a function that counts how many times each item is in the table? For example, it would return 2 for "1", but it would return 1 for the others. Thanks.

2 comments
I think you're suppose to replace "i" with "v".
yeah, thanks for catching that