fixed a bug in the count method, added last, first,partition,union,intersection and difference methods