added method count()