The last of the Four Foundations of Mindfulness is, in Pali, dhammasati. The literal translation is "mindfulness (sati) of dhamma" (or dharma in Sanskrit). But this fourth foundation, mindfulness of dharma, is sometimes also called mindfulness of mental objects.
This is a good example of how the word "dharma" has many layers and facets of meaning. Mental objects?
I struggled a bit with this and found a lecture by Tibetan Buddhist teacher Dzogchen Ponlop Rinpoche to be very helpful. This paragraph from the Rinpoche's talk explains mindfulness of mental objects/dharma pretty well --
"The fourth mindfulness is called the mindfulness of phenomena or mindfulness of dharmas. After working with the development of the mindfulness of mind, this mindfulness brings us to the next stage, which is the experience of panoramic awareness of the phenomenal world. The phenomenal world is not only within our thoughts, within our mind. The phenomenal world is also the object of our mind, the world that is experienced around us with body, speech, and mind. Having a sense of relating with these surrounding phenomena in a mindful way is what we call the mindfulness of phenomena. That mindfulness is basically the recognition of the interdependent relationship of our mind and the phenomenal world. It is working with the relationship of each individual phenomenon existing around us as the object of our experience. In order to understand that particular phenomenon and relate with it properly, we must develop the mindfulness of phenomena. And that, in some sense, is not really separated from awareness."
Simply, the many things we think of as being "out there" are not "out there" at all.