A good definition for Ray of light is provided by Wiki. It is a theoretical term ideally used to mention the propagation of light in Ray optics (simply, it's an assumption of a path that light may take along its direction). You could draw infinite number of rays from a point source of light. We require rays (at least wave-fronts) for drawing diagrams of reflection, refraction, etc.
According to Wiki,
It is a line or curve perpendicular to the wavefront of light.
If we take Huygens principle (Every point on a given wavefront may be considered as a source of secondary wavelet which spread out in the medium at $c$ and the new wavefront is the forward envelope of secondary wavelet at that instant) into account, we could do a lot of tactics here.
The number of photons in a ray of light at any given period of time (i.e. the rate of emission) is finite. But, that number of photons is also based on our assumption (how we've chosen the ray). Also, the source is always emitting photons until it's switched off...
Photon is just the quantum of electromagnetic radiation or the carrier of EM energy (or force) having zero rest mass, exhibits wave-particle duality and which has the anti-particle only as itself. While calculating the frequency (or wavelength) of the light (or photon), you aren't considering a ray of light 'cause you don't require the use of it.
I can't still understand how the energy became infinity? It becomes infinite only when the frequency is $\infty$ or it's an infinitely energetic source (which is too ideal here).