Added count methods to entities