A collector of US stamps will eventually encounter a pane, plate block, or some other multiple of a stamp with the margin still attached. Within the margin will be a penciled number like “5”. Why is it there?
Years ago, the USPS required window clerks to balance their drawers. The amount of cash in the drawer must match the amount of stamps that were sold. This is when window clerks didn’t have easy access to a postage meter. Clerks had to carry a wide variety of denominations of stamps. When dealing with many panes of stamps at once, clerks would put numbers in the selvedge of the stamps to keep the panes of stamps counted.
At the beginning of the day, the clerk would note that he was on pane #4 and there were 5 stamps already gone from the pane. At the end of the day, the clerk was on pane #9 and there were 22 stamps gone from the pane. A little math told the clerk how many stamps he sold and how much money he should have in his drawer.
Do markings like this affect value? In general, yes.
For example, a plate block of an inexpensive issue with a pencil note in the margin has no value. There are plenty of plate blocks that are clean. Collectors will buy the clean versions, but not ones with pencil marks. In these cases, the stamps can be sold as mint singles or used up for postage.
Suppose the item is not inexpensive, such as a plate block of Scott #834, the $5 Prexy issue. In these cases, the pencil marks will reduce the value. But I don’t recommend selling the stamps as singles or using them for postage. In these cases, collectors who can’t afford the pristine copy may be willing to buy the copy with pencil markings at a reduced price. The buyer saves a few dollars and the seller has some demand for their item.
There may be some cases where the only known copy of an item has pencil writing in the margin. For example, a plate block that is rare or unique. In this case, the pencil writing is irrelevant. It’s a rare/unique piece. Someone may value it a little less because of the pencil marks. But that is overshadowed by the fact that it is rare/unique.