The life expectancy of a DSLR camera is usually measured in shutter actuations. For example, Nikon D5000 is good for about 100,000 shutter clicks. That doesn’t mean that your camera dies the day it exceeds its shutter actuation limit, but the shutter count provides a good indication of the camera’s condition.
While none of the major camera manufacturers provide an in-camera feature for checking the shutter count value, you can use digiKam to do that. Double-click on the most recent photo taken with your camera to open it in the preview pane. Press the Metadata button on the right side of the main window to show the Metadata sidebar. Click on the Makernote tab, and press the Full List button. Scroll down the list to locate the Shutter Count entry and its value. Keep in mind, though, that Shutter Count is a proprietary tag, so it may or may not be supported by your specific camera model.
By the way, if you are curious about the real life expectancy of your particular camera model, check the excellent Camera Shutter Life Expectancy Database resource.