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