local T=script.Parent local A=T.Parent local u=require(A.t)local function S()return true end local b=u.tuple(u.table,u.optional(u.callback))local function p(T,A)assert(b(T,A))A=A or S local u=0 for T,S in pairs(T)do if A(S,T)then u=u+1 end end return u end return p
local Dictionary = script.Parent

local Llama = Dictionary.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(dictionary, predicate)
	assert(validate(dictionary, predicate))

	predicate = predicate or alwaysTrue
	
	local counter = 0

	for key, value in pairs(dictionary) do
		if predicate(value, key) then
			counter = counter + 1
		end
	end

	return counter
end

return count