Yes, all mountain biking activities contribute towards your training goals in JOIN. However, the type of mountain biking you do can make a difference. Riding on dirt tracks or fire roads is similar to endurance training on the road, while shredding purpose-built mountain bike courses tends to be more technical, explosive, and challenging. In these cases, it may be difficult to maintain specific heart rate or power levels, so you may need to rely more on how you feel during the ride. However, your heart rate or power data will still provide JOIN with information on the intensity of the ride and will be taken into account in your training plan accordingly.
If you want to combine road and mountain biking training, you can find more information here: https://join.cc/cycling-tips/how-to-combine-training-on-the-roadbike-and-mtb/.