added count and isEmpty()