I know that lactose is used in the brewing process for milk stout, but I don't know if it remains there by the end of the brewing process. I'm very lactose intolerant, and want to know if I need to take a lactase pill if I drink a milk stout.
Yes, the lactose remains in the beer at the end of brewing.
In normal beer, the only sugar which enters the brewing process is from the malted barley: maltose and glucose released by the breakdown of starch, and a little sucrose and fructose. This 1953 analysis by a chemist in the Carlsberg research laboratory has all the gory details.
Normal brewing yeast has enzymes that break down glucose and fructose, but not lactose. This kind of yeast evolved on rotting fruit, where there is plenty of sucrose, glucose, and fructose, but no lactose, so they never needed the enzymes. There are other yeasts which can ferment lactose, but they aren't used in brewing, except by zany vodka makers and Mongols.
So, in a normal beer, potentially all of the sugar can be broken down during brewing. Whether it is or not is up to the brewer, who can stop the process while sugar remains, or let it run to completion. However, in a milk stout, there is no way for the lactose to be broken down, so it all remains at the end.
The amount of lactose in a milk stout varies, but it seems that it is likely to be in the range of 5 to 13%; that is, in a (568 millilitre) pint, there may be anywhere from 28 to 74 grams of lactose. The lactose concentration in milk is about 4%, so this is the equivalent of 700 - 1850 millilitres of milk. Rather a lot!
Perhaps you might like a honey porter instead?
The 5 to 13% figure above is a misinterpretation. Those percentages refer to the ratio of lactose to grain. If you look at actual recipes for home-brewed stouts, you'll find that they use 0.5 to 1.0 lb (250–500 g) of lactose for a recipe that makes 5 gallons (20 L). The larger amount makes a stout that is quite sweet.
That works out to between 1.25% and 2.50% lactose. A one-pint glass of milk stout will contain 6–12 grams of lactose, somewhat less than a one-cup serving of milk. Someone who is mildly lactose intolerant should be able to drink a pint with no ill effects, but if you are very intolerant then lactase would be a good idea.