They have no rest mass. But they have a small mass by virtue of the fact that they have energy:
Ephoton = mc2, so m = Ephoton/c2
And they have an exhaust velocity = c.
Thrust = mass flow rate * exhaust velocity. So if you have some number N photons per second, then
T = NEphoton/c2 * c = NEphoton/c.
I don't rightly know how you'd count photons, but it occurs to me that NEphoton is the total photon energy flux, so you don't really need to count photons, you just need to know the photon energy output by the thrust "beam".
Thank you for that great explanation.