local j=script.Parent local g=j.Parent local B=require(g.t)local function N()return true end local f=B.tuple(B.table,B.optional(B.callback))local function i(j,g)assert(f(j,g))g=g or N local B=0 for j,N in ipairs(j)do if g(N,j)then B+=1 end end return B end return i
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