A Demand meter measures kWH use in a demand interval, usually 15, 30 or 60 minutes, and records the maximum value measured during a billing period.
A meter with a pulse attachment or function outputs a pulse (contact closure) for every "x" kWH used.
Counting the pulses measures the energy (kWH) used. It is real time instead of waiting for a meter reading and subtracting the previous reading It is cheaper and more accurate than using a kW transducer to send a signal to a control or accounting system.
Old analog meters had a gearing attachment that switched a form C contact every few disk revolutions. A pulse accumulator could take pulses from several meters, total them and record the result. The contacts were wired out to a device that registered each pulse on a mechanical counter that reset at the end of the interval and printed the interval's total on a paper tape. Each billing period, the utility meter reader removed the tape and looked for the largest recorded demand.
Most modern meters can do this with communications instead of the pulse contacts.
Our aluminum plant meters had 1 pulse = 400 kWH. Meters for the four utility feeders fed pulses to an accumulator with a dipaly and papaer tape recorder. We bought power strictly by demand, no kwh charges. Each month, we contracted for delivery of a set MW, always in units of 400 kwh, like 150.40 MW ( =376 pulses). If we went over in any one hour, we got charged that higher demand for the next 6-10 months. By monitoring the rate of power use and controlling the high current DC process we could squeeze an extra "free" 350 kwh out of each hour by getting the meter to reset before it hit pulse 377.