Let κ be an uncountable regular cardinal. Call an equivalence relation on functions from κ into 2 second order definable over H(κ) if there exists a second order sentence ϕ and a parameter P ⊆ H(κ) such that functions f and g from κ into 2 are equivalent iff the structure ⟨ H(κ), ∈, P, f, g ⟩ satisfies ϕ. The possible numbers of equivalence classes of second order definable equivalence relations include all the nonzero cardinals at most κ⁺. Additionally, the possibilities are closed under unions and products of at most κ cardinals. We prove that these are the only restrictions: Assuming that GCH holds and λ is a cardinal with $λ^κ = λ$, there exists a generic extension where all the cardinals are preserved, there are no new subsets of cardinality < κ, $2^κ = λ$, and for all cardinals μ, the number of equivalence classes of some second order definable equivalence relation on functions from κ into 2 is μ iff μ is in Ω, where Ω is any prearranged subset of λ such that 0 ∉ Ω, Ω contains all the nonzero cardinals ≤ κ⁺, and Ω is closed under unions and products of at most κ cardinals.