count implemented
manually merged