I’ve seen the film once, but my impression of this last battle from the X-Wing perspective was this:
We are shown about 12 (?) X-Wings arriving at the target location and going in for the attack.
Then, the story switches mainly shows ground events which would seem to happen while X-Wings and TIE fighters battle the whole time. During the scenes where we see that battle, it seems like X-Wing losses are pretty frequent - maybe one per ten seconds.
The ground events include hiking a fairly long distance through forest and a wide open field, sneaking around a base and fighting, taking and disposing of a prisoner, trying to connect with a confused adolescent child, planting lots of explosives, hiking back across the open field and through woods, and having a fairly long set of fights. Seems like that probably would have taken at least 45 minutes.
In stark contrast to the space battle in Star Wars Episode IV: A New Hope, where pretty much every X-Wing loss is shown or heard, in Star Wars Episode VII: The Force Awakens it seems like there must have been a much larger battle that we don’t see most of.
So, given that there was still a useful number of X-Wings remaining, how many X-Wings were actually sent and lost in that attack?