local q=script.Parent local O=q.Parent local S=require(O.t)local function Y()return true end local u=S.tuple(S.table,S.optional(S.callback))local function z(q,O)assert(u(q,O))O=O or Y local S=0 for q,Y in pairs(q)do if O(Y,q)then S=S+1 end end return S end return z
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