If we can functionalize the end groups of the polymer with an element that is not found elsewhere in the polymer, such as a halogen, then we can use elemental analysis to figure out what mass or atom percentage of that element is in the sample. Working backwards, we can then figure out how many of those atoms there are in total, and hence how many end groups there are in the sample.
PROBLEM
1 g of a sample of polyester polyol of Mn = 3,000 g/mol was treated with bromoacetyl bromide to convert the hydroxyl end groups to bromoacetyl end groups as shown below. The treated polymer was found to contain 4.88% by weight Br by elemental analysis. Estimate the average number of hydroxyl groups on each molecule of the polyol. Bromine = 79.9 g/mol.

ANSWER
For every OH group reacted, the molar mass changes, because the –OH loses the H but gains the two carbons, an oxygen, bromine, and two more hydrogens. Thus, the molar mass of polymer for each hydroxyl group that reacts increase by: (79.9+24+16+2-1)g/mol = 120.9 g/mol
If “x” is the average number of OH groups per polymer molecule that reacted with the bromoacetyl bromide, then:
Mass percentage of bromine content found would then be:
There are about 2 hydroxyl groups per polymer molecule.