local function C()return true end local function Z(Z,J)local N=type(Z)assert(N=="\116\097\098\108\101","\101\120\112\101\099\116\101\100 \097 \116\097\098\108\101 \102\111\114 \102\105\114\115\116 \097\114\103\117\109\101\110\116\044 \103\111\116 "..N)local F=0 J=J or C for C,Z in pairs(Z)do if J(Z,C)then F=F+1 end end return F end return Z

local function alwaysTrue()
	return true
end

local function count(dictionary, predicate)
	local dictionaryType = type(dictionary)
	assert(dictionaryType == "table", "expected a table for first argument, got " .. dictionaryType)
	
	local counter = 0

	predicate = predicate or alwaysTrue

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

	return counter
end

return count