Factory returns the correct class
Implemented Hash methods: count and isEmpty