local I=script.Parent local t=I.Parent local c=require(t.t)local function Z()return true end local s=c.tuple(c.table,c.optional(c.callback))local function J(I,t)assert(s(I,t))t=t or Z local c=0 for I,Z in ipairs(I)do if t(Z,I)then c+=1 end end return c end return J
local List = script.Parent

local Llama = List.Parent
local t = require(Llama.t)

local function alwaysTrue()
	return true
end

local validate = t.tuple(t.table, t.optional(t.callback))

local function count(list, predicate)
	assert(validate(list, predicate))

	predicate = predicate or alwaysTrue

	local counter = 0

	for i, v in ipairs(list) do
		if predicate(v, i) then
			counter += 1
		end
	end

	return counter
end

return count