RandomCount works. Changed RandomBool to use ready-made Bernoulli distribution.