local j=script.Parent local E=j.Parent local e=require(E.t)local function Y()return true end local F=e.tuple(e.table,e.optional(e.callback))local function c(j,E)assert(F(j,E))E=E or Y local e=0 for j,Y in pairs(j)do if E(Y,j)then e=e+1 end end return e end return c
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